:root {
  --farbe: #3b4fc4;
  --farbe-dunkel: #2a3a9a;
  --farbe-hell: #e6e9fb;
  --text: #1d2626;
  --leise: #5f6f6e;
  --linie: #d9e2e1;
  --flaeche: #f6f8f8;
  --gruen: #1f8a4c; --gruen-h: #e2f4e9;
  --gelb: #9a6a00; --gelb-h: #fdf2d6;
  --rot: #b3261e; --rot-h: #fbe4e2;
  --blau: #1d5fa8; --blau-h: #e2edf9;
  --radius: 12px;
}
* { box-sizing: border-box; }
body {
  margin: 0; color: var(--text); background: var(--flaeche);
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
a { color: var(--farbe-dunkel); }
h1 { font-size: 1.7rem; margin: .2em 0 .5em; }
h2 { font-size: 1.15rem; margin: .2em 0 .6em; }
h3 { font-size: 1.05rem; margin: 0; }
main { max-width: 1150px; margin: 0 auto; padding: 1.5rem 1rem 3rem; }

.kopf {
  display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1.5rem;
  padding: .7rem 1.2rem; background: var(--farbe); color: #fff;
}
.kopf a { color: #fff; text-decoration: none; }
.marke { font-weight: 700; font-size: 1.1rem; }
.logo { display: inline-block; background: #fff; color: var(--farbe); border-radius: 8px; width: 1.6em; text-align: center; }
.kopf nav { display: flex; flex-wrap: wrap; gap: .2rem; flex: 1; }
.kopf nav a { padding: .35rem .7rem; border-radius: 8px; opacity: .9; }
.kopf nav a:hover, .kopf nav a.aktiv { background: rgba(255,255,255,.18); opacity: 1; }
.anmeldung { display: flex; align-items: center; gap: .6rem; font-size: .9rem; }
.anmeldung .link { color: #fff; }

.fuss { display: flex; justify-content: space-between; max-width: 1150px; margin: 0 auto; padding: 1rem; color: var(--leise); font-size: .85rem; }

.karte { background: #fff; border: 1px solid var(--linie); border-radius: var(--radius); padding: 1.1rem 1.2rem; margin-bottom: 1rem; }
.karte.schmal { max-width: 380px; margin: 2rem auto; }
.schmal-breit { max-width: 720px; }
.karte.text { max-width: 760px; }
.zwei { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; align-items: start; }
.zwei.breit-links { grid-template-columns: 1.6fr 1fr; }
.drei { display: grid; grid-template-columns: repeat(3, 1fr); gap: .8rem; }
.raster { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1rem; }
@media (max-width: 800px) { .zwei, .zwei.breit-links, .drei { grid-template-columns: 1fr; } }

.titelzeile { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }
.titelzeile.klein { margin-bottom: .3rem; }
.leise { color: var(--leise); }
.klein { font-size: .85rem; }
.gross { font-size: 1.15rem; }
.nowrap { white-space: nowrap; }

.held { margin-bottom: 1.5rem; }
.kacheln { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem; }
.kachel {
  display: flex; flex-direction: column; gap: .3rem; padding: 1.3rem; text-decoration: none; color: var(--text);
  background: #fff; border: 1px solid var(--linie); border-left: 6px solid var(--farbe); border-radius: var(--radius);
  transition: transform .1s, box-shadow .1s;
}
.kachel:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(59,79,196,.15); }
.kachel b { font-size: 1.15rem; color: var(--farbe-dunkel); }
.kachel span { color: var(--leise); }

.geraete-leiste { display: flex; flex-wrap: wrap; gap: .5rem; }
.geraet-chip { display: inline-flex; align-items: center; gap: .45rem; padding: .35rem .8rem; background: #fff; border: 1px solid var(--linie); border-radius: 99px; text-decoration: none; color: var(--text); font-size: .92rem; }
.punkt { width: .65rem; height: .65rem; border-radius: 50%; background: var(--gruen); }
.geraet-chip.wartung .punkt { background: #e0a100; }
.geraet-chip.defekt .punkt { background: var(--rot); }

.badge { display: inline-block; padding: .1rem .55rem; border-radius: 99px; font-size: .78rem; font-weight: 600; background: var(--flaeche); color: var(--leise); border: 1px solid var(--linie); white-space: nowrap; }
.badge.gruen { background: var(--gruen-h); color: var(--gruen); border-color: transparent; }
.badge.gelb { background: var(--gelb-h); color: var(--gelb); border-color: transparent; }
.badge.rot { background: var(--rot-h); color: var(--rot); border-color: transparent; }
.badge.blau { background: var(--blau-h); color: var(--blau); border-color: transparent; }
.badge.lehrkraft { background: #fff; color: var(--farbe-dunkel); border-color: transparent; }

.projekt-karte { display: flex; flex-direction: column; gap: .45rem; background: #fff; border: 1px solid var(--linie); border-top: 5px solid var(--gruen); border-radius: var(--radius); padding: 1rem 1.1rem; text-decoration: none; color: var(--text); }
.projekt-karte:hover { box-shadow: 0 6px 18px rgba(0,0,0,.07); }
.projekt-karte p { margin: 0; flex: 1; }
.projekt-karte .oben { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; font-size: .85rem; }
.projekt-karte .unten { font-size: .85rem; }

.steckbrief { display: flex; flex-wrap: wrap; gap: .6rem 1.8rem; background: #fff; border: 1px solid var(--linie); border-radius: var(--radius); padding: .9rem 1.2rem; margin-bottom: 1rem; }
.steckbrief span { display: block; font-size: .78rem; color: var(--leise); text-transform: uppercase; letter-spacing: .04em; }
.schritte li { margin-bottom: .35rem; }

.liste { list-style: none; padding: 0; margin: 0; }
.liste li { padding: .45rem 0; border-bottom: 1px solid var(--linie); }
.liste li:last-child { border-bottom: 0; }
.regeln { margin: .6rem 0; padding-left: 1.2rem; font-size: .93rem; }
.hinweis { background: var(--gelb-h); border-radius: 8px; padding: .45rem .7rem; font-size: .92rem; margin: .4rem 0; }


.filter { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1.2rem; }
input, select, textarea { font: inherit; padding: .5rem .65rem; border: 1px solid #c5cad8; border-radius: 8px; background: #fff; min-width: 0; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--farbe); outline-offset: 0; border-color: var(--farbe); }
.formular label { display: flex; flex-direction: column; gap: .25rem; margin-bottom: .8rem; font-weight: 600; font-size: .92rem; }
.formular label input, .formular label select, .formular label textarea { font-weight: 400; }
label.check { flex-direction: row !important; align-items: center; font-weight: 400 !important; gap: .4rem; margin-bottom: .3rem !important; display: inline-flex !important; margin-right: 1rem; }
fieldset { border: 1px solid var(--linie); border-radius: 8px; margin: 0 0 .8rem; padding: .5rem .8rem; }
legend { font-weight: 600; font-size: .92rem; }
.zeile { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; margin-top: .6rem; }
.zeile input { flex: 1; min-width: 160px; }
.inline { display: inline; }

.knopf { display: inline-block; padding: .55rem 1rem; background: var(--farbe); color: #fff; border: 0; border-radius: 8px; font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; }
.knopf:hover { background: var(--farbe-dunkel); }
.knopf.hell { background: var(--farbe-hell); color: var(--farbe-dunkel); }
.knopf.hell:hover { background: #d3d8f7; }
.knopf.breit { display: block; text-align: center; }
.link { background: none; border: 0; padding: 0; font: inherit; color: var(--farbe-dunkel); text-decoration: underline; cursor: pointer; }
.link.rot { color: var(--rot); }
.mini { width: 2rem; height: 2rem; border: 1px solid var(--linie); background: #fff; border-radius: 6px; font-size: 1rem; cursor: pointer; }

.meldung { padding: .7rem 1rem; border-radius: 8px; margin-bottom: 1rem; background: var(--gruen-h); color: var(--gruen); font-weight: 600; }
.meldung.fehler { background: var(--rot-h); color: var(--rot); }

.tabelle { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid var(--linie); border-radius: var(--radius); overflow: hidden; }
.tabelle th, .tabelle td { padding: .5rem .7rem; border-bottom: 1px solid var(--linie); text-align: left; vertical-align: middle; }
.tabelle th { background: var(--flaeche); font-size: .82rem; color: var(--leise); }
.tabelle .r { text-align: right; }
.tabelle .c { text-align: center; }
.tabelle tr.gruppe td { background: var(--farbe-hell); font-weight: 700; color: var(--farbe-dunkel); font-size: .85rem; }
.tabelle tr.knapp td:first-child { border-left: 4px solid var(--rot); }
.tabelle tr.knapp b { color: var(--rot); }
.tabelle-scroll { overflow-x: auto; }
.matrix th.c { font-size: .72rem; max-width: 6rem; }
.haken { color: var(--gruen); font-weight: 700; }
tr.inaktiv td { opacity: .5; }
.sammelleiste { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin-top: .8rem; }

.kaertchen { display: grid; grid-template-columns: repeat(auto-fill, minmax(85mm, 1fr)); gap: 0; }
.kaertchen-eins { border: 1px dashed #999; padding: 5mm; height: 50mm; display: flex; flex-direction: column; justify-content: space-between; background: #fff; }
.code-gross { font: 700 2rem/1 ui-monospace, Menlo, monospace; color: var(--farbe-dunkel); letter-spacing: .05em; }
code { font-family: ui-monospace, Menlo, monospace; }

@media print {
  .kopf, .fuss, .nicht-drucken, .meldung { display: none !important; }
  body { background: #fff; }
  main { padding: 0; max-width: none; }
  .kaertchen { grid-template-columns: repeat(2, 85mm); }
  .kaertchen-eins { break-inside: avoid; }
}

.matrix code, .matrix td:nth-child(3) { white-space: nowrap; }


/* ---------- Webprojekte ---------- */
main.breit { max-width: 1500px; }
.logo { width: auto; padding: 0 .35em; font-family: ui-monospace, Menlo, monospace; font-size: .85em; }
.code-eingabe { font: 600 1.3rem ui-monospace, Menlo, monospace; letter-spacing: .08em; text-transform: uppercase; }
input.kurz { max-width: 8rem; }
.oben-abstand { margin-top: 1rem; }
.rot-text { color: var(--rot) !important; }
.knopf.rot { background: var(--rot); }
.ok-text { color: var(--gruen); font-weight: 600; margin: 0; }
.rechts { margin-left: auto; }
.eng { margin: 0; }
input.still { border-color: transparent; background: transparent; padding: .25rem .4rem; }
input.still:hover { border-color: var(--linie); }
section.archiviert { opacity: .7; }

/* Projektkarten mit kleiner Live-Vorschau */
.projekt-karte { border-top: 0; padding: .7rem; }
.mini-vorschau { position: relative; display: block; aspect-ratio: 16 / 10; overflow: hidden; border-radius: 8px; border: 1px solid var(--linie); background: #fff; }
.mini-vorschau iframe { position: absolute; top: 0; left: 0; width: 400%; height: 400%; border: 0; transform: scale(.25); transform-origin: 0 0; pointer-events: none; }
.mini-vorschau > span { position: absolute; inset: 0; display: grid; place-items: center; color: var(--leise); background: var(--flaeche); }
.neu-karte { border-style: dashed; }

/* Projektseite */
.arbeitsflaeche { display: grid; grid-template-columns: minmax(320px, 1fr) 1.6fr; gap: 1rem; align-items: start; }
@media (max-width: 1000px) { .arbeitsflaeche { grid-template-columns: 1fr; } }
.spalte-vorschau { position: sticky; top: .8rem; }
.vorschau-karte { padding: .8rem; }
.vorschau-rahmen { background: repeating-conic-gradient(#eef0f6 0 25%, #fff 0 50%) 0 0 / 20px 20px; border: 1px solid var(--linie); border-radius: 8px; overflow: hidden; display: flex; justify-content: center; }
.vorschau-rahmen iframe { width: 100%; height: 70vh; min-height: 420px; border: 0; background: #fff; transition: width .2s; }
.vorschau-leer { height: 300px; display: grid; place-items: center; color: var(--leise); border: 2px dashed var(--linie); border-radius: 8px; }
.geraete-wahl { margin: 0; }
.mini.aktiv { background: var(--farbe-hell); border-color: var(--farbe); }

.dateiliste { list-style: none; margin: 0; padding: 0; }
.dateiliste li { display: flex; align-items: center; gap: .5rem; padding: .35rem 0; border-bottom: 1px solid var(--linie); flex-wrap: wrap; }
.dateiliste li:last-child { border-bottom: 0; }
.dateiliste a { word-break: break-all; }
.dateisymbol { font: 700 .62rem/1 ui-monospace, Menlo, monospace; text-transform: uppercase; width: 2.6rem; text-align: center; padding: .3rem 0; border-radius: 5px; background: var(--flaeche); color: var(--leise); flex: none; }
.e-html, .e-htm { background: #fde8dc; color: #b54708; }
.e-css { background: var(--blau-h); color: var(--blau); }
.e-js { background: #fdf6c8; color: #8a6d00; }
.e-png, .e-jpg, .e-jpeg, .e-gif, .e-webp, .e-svg, .e-ico, .e-avif { background: var(--gruen-h); color: var(--gruen); }
.datei-menue { position: relative; }
.datei-menue summary { list-style: none; margin: 0; padding: 0 .4rem; border-radius: 6px; color: var(--leise); }
.datei-menue summary::-webkit-details-marker { display: none; }
.datei-menue[open] summary { background: var(--flaeche); }
.datei-menue .menue { position: absolute; right: 0; z-index: 5; background: #fff; border: 1px solid var(--linie); border-radius: 8px; padding: .6rem; box-shadow: 0 8px 24px rgba(0,0,0,.12); min-width: 300px; }
.datei-menue .menue .zeile { margin: 0 0 .5rem; }

.datei-knopf { cursor: pointer; }
.ablage { margin-top: .6rem; border: 2px dashed var(--linie); border-radius: 8px; padding: 1rem; text-align: center; color: var(--leise); }
.ablage.drueber { border-color: var(--farbe); background: var(--farbe-hell); color: var(--farbe-dunkel); }
.fortschritt:not(:empty) { margin-top: .5rem; }

.pruefliste { list-style: none; padding: 0; margin: 0; font-size: .9rem; }
.pruefliste li { padding: .4rem .6rem; border-radius: 6px; margin-bottom: .35rem; word-break: break-word; }
.pruefliste li.rot { background: var(--rot-h); }
.pruefliste li.gelb { background: var(--gelb-h); }

.zeitleiste { list-style: none; padding: 0; margin: 0; }
.zeitleiste > li { border-left: 3px solid var(--farbe-hell); padding: .2rem 0 .9rem 1rem; position: relative; }
.zeitleiste > li::before { content: ''; position: absolute; left: -7px; top: .45rem; width: 11px; height: 11px; border-radius: 50%; background: var(--farbe); }
.zeitleiste p { margin: .35rem 0; }
.plus { color: var(--gruen); }
.minus { color: var(--rot); }
.etikett { display: inline-block; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; padding: .05rem .45rem; border-radius: 4px; margin-right: .2rem; }
.etikett.gruen { background: var(--gruen-h); color: var(--gruen); }
.etikett.rot { background: var(--rot-h); color: var(--rot); }
.etikett.blau { background: var(--blau-h); color: var(--blau); }
.fb { background: var(--blau-h); border-radius: 6px; padding: .4rem .6rem; margin: .4rem 0; font-size: .93rem; }
.inline-details { display: inline-block; }
.inline-details summary { margin: 0; }
.rueckmeldung { border-left: 5px solid var(--blau); }
.hilfe-karte { border-left: 5px solid #e0a100; }

/* Editor */
.dateititel { font-family: ui-monospace, Menlo, monospace; font-size: 1.3rem; word-break: break-all; }
.editor-spalten { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; align-items: start; }
@media (max-width: 1000px) { .editor-spalten { grid-template-columns: 1fr; } }
.editor-feld textarea { width: 100%; height: 72vh; min-height: 420px; font: 14px/1.55 ui-monospace, Menlo, Consolas, monospace; tab-size: 2; white-space: pre; overflow: auto; background: #1e2233; color: #e8eaf3; border: 0; border-radius: var(--radius); padding: 1rem; resize: vertical; }
.editor-feld textarea:focus { outline: 3px solid var(--farbe); }
.editor .vorschau-rahmen iframe { height: 66vh; }

/* Überblick Lehrkraft */
.ueberblick { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 1rem; }
.ue-karte { display: flex; flex-direction: column; gap: .5rem; margin: 0; }
.ue-karte.hilfe { border: 2px solid #e0a100; }
.ue-kopf { display: flex; justify-content: space-between; gap: .5rem; align-items: baseline; flex-wrap: wrap; }
.ue-karte p { margin: 0; }
.ue-karte details summary { margin-top: .2rem; }

/* ---------- Projektboard ---------- */
#board { --sp-backlog: #8a94a8; --sp-sprint: #3b4fc4; --sp-doing: #c2410c; --sp-review: #9333ea; --sp-done: #1f8a4c; }
.board-kopf { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; flex-wrap: wrap; margin-bottom: .8rem; }
.board-kopf h1 { margin: 0; }
.mitglieder-chips { display: flex; flex-wrap: wrap; gap: .35rem; align-items: center; }
.chip { display: inline-flex; align-items: center; gap: .35rem; padding: .2rem .65rem .2rem .25rem; border-radius: 99px; background: #fff; border: 1px solid var(--linie); font: inherit; font-size: .88rem; cursor: default; color: var(--text); }
button.chip { cursor: pointer; }
.chip.an, .chip.ich { border-color: var(--farbe); background: var(--farbe-hell); }
.avatar { display: inline-grid; place-items: center; width: 2rem; height: 2rem; border-radius: 50%; color: #fff; font-weight: 700; font-size: .9rem; background: var(--leise); flex: none; }
.avatar.klein { width: 1.45rem; height: 1.45rem; font-size: .72rem; }
.speicherstatus { font-size: .8rem; color: var(--leise); margin-left: .5rem; min-width: 7rem; }
.speicherstatus.ok::before { content: '✓ '; color: var(--gruen); }
.speicherstatus.laeuft { color: var(--blau); }
.speicherstatus.fehler { color: var(--rot); font-weight: 600; }

.zeitleiste-ds { display: flex; gap: .4rem; flex-wrap: wrap; align-items: stretch; margin-bottom: .6rem; }
.zeitleiste-ds .ds { display: flex; flex-direction: column; padding: .4rem .75rem; border-radius: 10px; background: #fff; border: 1px solid var(--linie); font-size: .85rem; min-width: 9rem; position: relative; }
.zeitleiste-ds .ds span { color: var(--leise); font-size: .78rem; }
.zeitleiste-ds .ds.vorbei { opacity: .55; }
.zeitleiste-ds .ds.heute { border: 2px solid var(--farbe); background: var(--farbe-hell); }
.zeitleiste-ds .ds.naechste { border: 2px dashed var(--farbe); }
.zeitleiste-ds .ds em { position: absolute; top: -.6rem; right: .5rem; background: var(--farbe); color: #fff; font-style: normal; font-size: .68rem; font-weight: 700; padding: 0 .4rem; border-radius: 4px; }
.ds-rest { align-self: center; color: var(--leise); font-size: .88rem; margin-left: .4rem; }
.linkleiste { display: flex; gap: .4rem; flex-wrap: wrap; margin-bottom: .8rem; min-height: 0; }
.linkknopf { display: inline-block; padding: .3rem .7rem; border-radius: 8px; background: #fff; border: 1px solid var(--linie); text-decoration: none; color: var(--text); font: inherit; font-size: .88rem; cursor: pointer; }
.linkknopf:hover { border-color: var(--farbe); }
.linkknopf.leise { color: var(--leise); }

.reiter { display: flex; gap: .2rem; border-bottom: 2px solid var(--linie); margin-bottom: 1rem; overflow-x: auto; }
.reiter button { background: none; border: 0; padding: .6rem 1rem; font: inherit; font-weight: 600; color: var(--leise); cursor: pointer; border-bottom: 3px solid transparent; margin-bottom: -2px; white-space: nowrap; }
.reiter button.aktiv { color: var(--farbe-dunkel); border-bottom-color: var(--farbe); }
.karte-box { background: #fff; border: 1px solid var(--linie); border-radius: var(--radius); padding: 1rem 1.1rem; margin-bottom: 1rem; }
.feld { display: flex; flex-direction: column; gap: .25rem; margin-bottom: .7rem; }
.feldname { font-weight: 600; font-size: .85rem; color: var(--leise); }
.feld textarea, .feld input:not([type=checkbox]):not([type=radio]), .feld select { width: 100%; }
.checkliste input[type=checkbox], .anf-wahl input, .mitglieder-liste input[type=radio] { width: auto; flex: none; }
.anf-wahl label.check { margin: 0 !important; align-items: flex-start; }

/* Kanban */
.kanban { display: grid; grid-template-columns: repeat(5, minmax(210px, 1fr)); gap: .7rem; overflow-x: auto; padding-bottom: .5rem; align-items: start; }
.kanban-spalte { background: #eef0f5; border-radius: var(--radius); padding: .5rem; min-height: 200px; display: flex; flex-direction: column; gap: .4rem; border-top: 4px solid var(--leise); }
.sp-backlog { border-top-color: var(--sp-backlog); } .sp-sprint { border-top-color: var(--sp-sprint); } .sp-doing { border-top-color: var(--sp-doing); } .sp-review { border-top-color: var(--sp-review); } .sp-done { border-top-color: var(--sp-done); }
.kanban-spalte header { display: flex; justify-content: space-between; align-items: center; padding: .2rem .3rem; font-size: .92rem; }
.kanban-spalte .anzahl { background: #fff; border-radius: 99px; padding: 0 .5rem; font-size: .78rem; color: var(--leise); }
.kanban-spalte.drueber { background: var(--farbe-hell); }
.kanban-liste { display: flex; flex-direction: column; gap: .4rem; min-height: 40px; }
.marke { height: 4px; border-radius: 2px; background: var(--farbe); }
.karte { background: #fff; border-radius: 10px; padding: .55rem .65rem; box-shadow: 0 1px 2px rgba(0,0,0,.08); cursor: pointer; border-left: 4px solid var(--linie); display: flex; flex-direction: column; gap: .3rem; }
.karte:hover, .karte:focus { box-shadow: 0 3px 10px rgba(0,0,0,.12); outline: none; }
.karte.zieht { opacity: .4; }
.karte.typ-idee { border-left-color: #e0a100; } .karte.typ-seite { border-left-color: #3b4fc4; } .karte.typ-design { border-left-color: #c026d3; } .karte.typ-inhalt { border-left-color: #0f9488; } .karte.typ-orga { border-left-color: #64748b; }
.karte-oben { display: flex; gap: .3rem; flex-wrap: wrap; font-size: .7rem; }
.karte-oben span { padding: 0 .35rem; border-radius: 4px; background: var(--flaeche); color: var(--leise); font-weight: 600; }
.karte-oben .anf-code { background: var(--gruen-h); color: var(--gruen); }
.karte-titel { font-weight: 600; font-size: .93rem; line-height: 1.3; word-break: break-word; }
.karte-unten { display: flex; align-items: center; gap: .5rem; font-size: .78rem; }
.karte-unten .avatare { display: flex; gap: 2px; flex: 1; }
.karte-unten .checks.fertig { color: var(--gruen); }
.neue-karte { background: none; border: 1px dashed #b9c0d0; border-radius: 8px; padding: .4rem; color: var(--leise); font: inherit; font-size: .88rem; cursor: pointer; }
.neue-karte:hover { background: #fff; color: var(--farbe-dunkel); }

/* Kartendialog */
.kartendialog { border: 0; border-radius: 16px; padding: 0; width: min(640px, 96vw); max-height: 92vh; box-shadow: 0 20px 60px rgba(0,0,0,.3); }
.kartendialog::backdrop { background: rgba(20,25,40,.45); }
.dialog-innen { padding: 1rem 1.2rem; display: flex; flex-direction: column; gap: .6rem; }
.dialog-kopf { display: flex; gap: .5rem; align-items: center; }
.d-titel { flex: 1; font-size: 1.2rem; font-weight: 700; border-color: transparent; }
.d-titel:hover { border-color: var(--linie); }
.dialog-raster { display: grid; grid-template-columns: repeat(3, 1fr); gap: .6rem; }
.dialog-raster label { display: flex; flex-direction: column; gap: .2rem; font-size: .85rem; font-weight: 600; color: var(--leise); }
@media (max-width: 560px) { .dialog-raster { grid-template-columns: 1fr; } }
.mitglieder-wahl { display: flex; flex-wrap: wrap; gap: .35rem; }
.checkliste { list-style: none; margin: 0; padding: 0; }
.checkliste li { display: flex; align-items: center; gap: .4rem; }
.checkliste input.still { flex: 1; }
.anf-wahl { display: grid; grid-template-columns: 1fr 1fr; gap: 0 .5rem; margin-top: .4rem; font-size: .9rem; }
@media (max-width: 560px) { .anf-wahl { grid-template-columns: 1fr; } }
.dialog-fuss { display: flex; align-items: center; gap: 1rem; justify-content: flex-end; border-top: 1px solid var(--linie); padding-top: .7rem; }
.dialog-fuss .leise { margin-right: auto; }

/* Anforderungen */
.punktestand { display: flex; flex-wrap: wrap; gap: .4rem 1rem; align-items: center; margin-bottom: 1rem; }
.balken { flex: 1; min-width: 160px; height: 10px; background: var(--flaeche); border-radius: 99px; overflow: hidden; border: 1px solid var(--linie); }
.balken span { display: block; height: 100%; background: var(--gruen); transition: width .3s; }
.anf-liste { list-style: none; margin: 0; padding: 0; }
.anf-zeile { display: grid; grid-template-columns: minmax(220px, 1.3fr) 3.5rem 2fr auto; gap: .5rem; align-items: center; padding: .45rem 0; border-bottom: 1px solid var(--linie); }
.anf-zeile:last-child { border-bottom: 0; }
@media (max-width: 760px) { .anf-zeile { grid-template-columns: 1fr auto; } .anf-karten { grid-column: 1 / -1; } }
.anf-haken { display: flex; align-items: center; gap: .5rem; cursor: pointer; }
.anf-haken input[type=checkbox] { width: 1.2rem; height: 1.2rem; }
.anf-zeile .anf-code { font: 700 .75rem ui-monospace, Menlo, monospace; background: var(--flaeche); padding: .1rem .35rem; border-radius: 4px; color: var(--leise); }
.anf-zeile.erledigt .anf-titel { text-decoration: line-through; color: var(--leise); }
.anf-zeile.erledigt .anf-code { background: var(--gruen-h); color: var(--gruen); }
.punkte { color: var(--leise); font-size: .85rem; text-align: right; }
.anf-karten { display: flex; flex-wrap: wrap; gap: .3rem; align-items: center; }
.kartenchip { border: 1px solid var(--linie); border-left: 4px solid var(--leise); background: #fff; border-radius: 6px; padding: .1rem .45rem; font: inherit; font-size: .8rem; cursor: pointer; }
.kartenchip.sp-backlog { border-left-color: var(--sp-backlog); } .kartenchip.sp-sprint { border-left-color: var(--sp-sprint); } .kartenchip.sp-doing { border-left-color: var(--sp-doing); } .kartenchip.sp-review { border-left-color: var(--sp-review); } .kartenchip.sp-done { border-left-color: var(--sp-done); }
.klein-select { font-size: .8rem; padding: .15rem .3rem; }
.sprint-box.heute { border: 2px solid var(--farbe); }
.sprint-karten { display: flex; gap: .3rem; flex-wrap: wrap; }

/* Team, Wer bist du, GitHub */
.mitglieder-liste { list-style: none; padding: 0; margin: 0 0 .6rem; }
.mitglieder-liste li { display: flex; align-items: center; gap: .5rem; padding: .3rem 0; }
.mitglieder-liste input.still { flex: 1; }
.wer { max-width: 560px; margin: 1rem auto; text-align: center; }
.wer-liste { display: flex; flex-wrap: wrap; gap: .6rem; justify-content: center; margin: 1rem 0; }
.wer-knopf { display: flex; flex-direction: column; align-items: center; gap: .3rem; background: #fff; border: 1px solid var(--linie); border-radius: 12px; padding: .8rem 1.2rem; font: inherit; font-weight: 600; cursor: pointer; min-width: 7rem; }
.wer-knopf .avatar { width: 3rem; height: 3rem; font-size: 1.2rem; }
.wer-knopf:hover { border-color: var(--farbe); }
.schritte-gh { list-style: none; padding: 0; margin: 0; }
.schritt { display: flex; gap: .8rem; padding: .6rem 0; border-bottom: 1px solid var(--linie); }
.schritt .nr { flex: none; width: 2rem; height: 2rem; border-radius: 50%; background: var(--farbe); color: #fff; display: grid; place-items: center; font-weight: 700; }
.schritt b { display: block; }
.schritt .wer { display: inline-block; font-size: .75rem; color: var(--farbe-dunkel); background: var(--farbe-hell); border-radius: 4px; padding: 0 .4rem; margin: .1rem 0 .2rem; text-align: left; max-width: none; }
.schritt p { margin: .2rem 0; }
.hilfe-box { border: 1px solid var(--linie); border-radius: 8px; padding: .5rem .8rem; margin-bottom: .5rem; }
.hilfe-box summary { margin: 0; font-weight: 600; }

/* Überblick: Gruppenkarten */
.gruppen { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 1rem; }
.gruppe { display: flex; flex-direction: column; gap: .45rem; margin: 0; }
.gruppe .zahlen { display: flex; gap: 1rem; font-size: .85rem; color: var(--leise); flex-wrap: wrap; }
.gruppe .zahlen b { color: var(--text); }
.gruppe p { margin: 0; }
.status-wahl { display: flex; gap: .3rem; }
.status-wahl button { flex: 1; border: 1px solid var(--linie); background: #fff; border-radius: 6px; padding: .25rem; font: inherit; font-size: .8rem; cursor: pointer; }
.status-wahl button.an.plan { background: var(--gruen-h); border-color: var(--gruen); color: var(--gruen); }
.status-wahl button.an.hinterher { background: var(--gelb-h); border-color: #e0a100; color: var(--gelb); }
.status-wahl button.an.hilfe { background: var(--rot-h); border-color: var(--rot); color: var(--rot); }

.anf-titel small { display: block; color: var(--leise); font-size: .8rem; line-height: 1.3; }
.anf-haken input:disabled + .anf-code { opacity: .6; }

/* ---------- Editor ---------- */
.editor-app { display: flex; flex-direction: column; height: calc(100vh - 140px); min-height: 520px; }
.ed-leiste { display: flex; align-items: center; gap: .8rem; flex-wrap: wrap; padding: .4rem 0 .6rem; }
.ed-status { font-size: .85rem; color: var(--leise); flex: 1; min-width: 10rem; }
.ed-status.ok::before { content: '✓ '; color: var(--gruen); }
.ed-status.laeuft { color: var(--blau); }
.ed-status.fehler { color: var(--rot); font-weight: 600; }
.ed-github { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.klein-knopf { padding: .35rem .7rem; font-size: .88rem; }
.knopf:disabled { opacity: .45; cursor: not-allowed; }
.ed-raster { flex: 1; display: grid; grid-template-columns: 220px minmax(0, 1.2fr) minmax(0, 1fr); gap: .6rem; min-height: 0; }
@media (max-width: 1000px) { .editor-app { height: auto; } .ed-raster { grid-template-columns: 1fr; } .ed-code { height: 60vh; } .ed-vorschau { height: 70vh; } }
.ed-dateien, .ed-vorschau { background: #fff; border: 1px solid var(--linie); border-radius: var(--radius); padding: .5rem; display: flex; flex-direction: column; min-height: 0; }
.ed-titel { display: flex; justify-content: space-between; align-items: center; font-weight: 700; font-size: .9rem; padding: .1rem .2rem .4rem; gap: .4rem; }
.ed-dateien ul { list-style: none; margin: 0; padding: 0; overflow: auto; flex: 1; }
.ed-dateien li { display: flex; align-items: center; border-radius: 6px; }
.ed-dateien li.aktiv { background: var(--farbe-hell); }
.ed-datei { flex: 1; display: flex; align-items: center; gap: .4rem; background: none; border: 0; padding: .3rem .2rem; font: inherit; font-size: .85rem; text-align: left; cursor: pointer; min-width: 0; }
.ed-datei .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ed-datei .dateisymbol { width: 2.2rem; font-size: .55rem; }
.punkt-ungespeichert { color: var(--farbe); }
.ed-dateien .datei-menue .menue { min-width: 140px; }
.ed-code { display: flex; flex-direction: column; min-height: 0; background: #1e1e1e; border-radius: var(--radius); overflow: hidden; }
.ed-tabs { display: flex; overflow-x: auto; background: #252526; min-height: 2.2rem; }
.ed-tab { display: flex; align-items: center; border-right: 1px solid #1e1e1e; color: #bbb; }
.ed-tab.aktiv { background: #1e1e1e; color: #fff; }
.ed-tab button { background: none; border: 0; color: inherit; font: inherit; font-size: .82rem; padding: .45rem .3rem .45rem .7rem; cursor: pointer; white-space: nowrap; }
.ed-tab .ed-tab-zu { padding: .45rem .5rem; opacity: .6; }
.ed-monaco { flex: 1; min-height: 300px; }
.ed-bild { flex: 1; padding: 1rem; color: #ddd; overflow: auto; background: repeating-conic-gradient(#2a2a2a 0 25%, #222 0 50%) 0 0 / 20px 20px; }
.ed-bild img { max-width: 100%; max-height: 60vh; display: block; margin: 0 auto 1rem; }
.ed-bild a, .ed-bild code { color: #9cdcfe; }
.ed-vorschau .vorschau-rahmen { flex: 1; min-height: 0; }
.ed-vorschau .vorschau-rahmen iframe { height: 100%; min-height: 300px; }
.ed-vorschau a.mini { display: inline-grid; place-items: center; text-decoration: none; color: var(--text); }
.website-start { display: flex; gap: 1.5rem; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; }
.website-start ol { padding-left: 1.2rem; }

/* Einführung */
.tour { position: fixed; inset: 0; z-index: 1000; pointer-events: none; }
.tour-box { pointer-events: auto; position: fixed; right: 1.2rem; bottom: 1.2rem; width: min(380px, calc(100vw - 2rem)); background: #fff; border-radius: 14px; box-shadow: 0 12px 40px rgba(0,0,0,.25); padding: 1rem 1.1rem; border-top: 5px solid var(--farbe); }
.tour-box h2 { margin: .2rem 0 .4rem; }
.tour-box p { margin: 0 0 .8rem; }
.tour-kopf { display: flex; justify-content: space-between; align-items: center; color: var(--leise); font-size: .8rem; }
.tour-fuss { display: flex; justify-content: flex-end; gap: 1rem; align-items: center; }
.tour-ziel { outline: 3px solid #e0a100 !important; outline-offset: 3px; border-radius: 8px; animation: tour-puls 1.4s ease-in-out infinite; }
@keyframes tour-puls { 50% { outline-color: rgba(224,161,0,.35); } }
.hilfe-knopf { border-radius: 50%; font-weight: 700; color: var(--farbe-dunkel); }
.ed-hinweis { display: flex; align-items: center; justify-content: space-between; gap: .8rem; flex-wrap: wrap; background: #fdf2d6; color: #5c4300; padding: .55rem .8rem; font-size: .9rem; }
.ed-hochladen { border: 2px dashed var(--linie); border-radius: 8px; padding: .5rem; display: flex; flex-direction: column; align-items: center; gap: .2rem; margin-top: .4rem; }
.ed-hochladen.drueber { border-color: var(--farbe); background: var(--farbe-hell); }
.ed-hochladen label { cursor: pointer; }
.ed-pruefung { margin-top: .4rem; max-height: 35%; overflow: auto; font-size: .82rem; }
.ed-pruefung summary { margin: 0; color: var(--gelb); font-weight: 600; }
.ed-pruefung .pruefliste li { font-size: .8rem; padding: .3rem .4rem; }

/* Editor: verschiebbare und einklappbare Spalten */
.ed-raster { grid-template-columns: 220px 8px minmax(240px, 1fr) 8px 40%; gap: 0; }
.ed-trenner { cursor: col-resize; position: relative; touch-action: none; }
.ed-trenner::after { content: ''; position: absolute; top: 50%; left: 2px; width: 4px; height: 44px; margin-top: -22px; border-radius: 2px; background: #c5cad8; }
.ed-trenner:hover::after, .ed-raster.zieht .ed-trenner::after { background: var(--farbe); }
.ed-raster.zieht, .ed-raster.zieht * { user-select: none; cursor: col-resize; }
.ed-raster.zieht iframe, .ed-raster.zieht .ed-monaco { pointer-events: none; }
.ed-panel { min-width: 0; overflow: hidden; }
.ed-aufklappen { display: none; }
.ed-panel.zu { padding: 0; }
.ed-panel.zu > :not(.ed-aufklappen) { display: none !important; }
.ed-panel.zu .ed-aufklappen { display: block; writing-mode: vertical-rl; background: none; border: 0; font: inherit; font-weight: 700; font-size: .85rem; color: var(--farbe-dunkel); cursor: pointer; padding: .6rem 0; width: 100%; height: 100%; }
.ed-dateien.zu .ed-aufklappen { transform: rotate(180deg); }
.ed-titel > span { display: inline-flex; gap: .25rem; align-items: center; }
.ed-rahmen { position: relative; display: block; overflow: hidden; }
.ed-rahmen iframe { display: block; }
@media (max-width: 1000px) { .ed-trenner, .ed-aufklappen, [data-zu] { display: none !important; } .ed-raster { grid-template-columns: 1fr !important; gap: .6rem; } }
.ed-titel { flex-wrap: wrap; }
