:root {
  --grund: #f6f5f2; --flaeche: #ffffff; --seite: #efede8; --linie: #e2dfd8;
  --text: #22201c; --leise: #7b766c; --akzent: #d1453b; --akzent-weich: #f9e3e0;
  --gut: #2f9e5b; --schatten: 0 1px 2px rgba(0,0,0,.06), 0 4px 16px rgba(0,0,0,.05);
}
@media (prefers-color-scheme: dark) {
  :root {
    --grund: #1c1b19; --flaeche: #252421; --seite: #201f1c; --linie: #3a3833;
    --text: #ecebe7; --leise: #9c978d; --akzent: #ef6b5f; --akzent-weich: #3d2522;
    --gut: #4cc47b; --schatten: none;
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--grund); color: var(--text); font: 15px/1.45 system-ui, "Segoe UI", Roboto, sans-serif; }
button, input { font: inherit; color: inherit; }

.app { display: grid; grid-template-columns: 260px 1fr; min-height: 100%; }
.seite { background: var(--seite); border-right: 1px solid var(--linie); padding: 18px 12px; display: flex; flex-direction: column; gap: 10px; }
.marke { display: flex; align-items: center; gap: 8px; font-weight: 650; font-size: 17px; padding: 0 8px 8px; }
.logo { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; background: var(--akzent); color: #fff; font-size: 15px; }
.status { margin-left: auto; font-size: 12px; font-weight: 500; padding: 2px 8px; border-radius: 99px; }
.status::before { content: "●"; margin-right: 4px; }
.status.an { color: var(--gut); background: color-mix(in srgb, var(--gut) 14%, transparent); }
.status.aus { color: var(--leise); background: color-mix(in srgb, var(--leise) 14%, transparent); }

.listen { display: flex; flex-direction: column; gap: 2px; }
.listen a { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border-radius: 8px; color: inherit; text-decoration: none; cursor: pointer; }
.listen a:hover { background: color-mix(in srgb, var(--text) 6%, transparent); }
.listen a.aktiv { background: var(--akzent-weich); color: var(--akzent); font-weight: 600; }
.listen .zahl { margin-left: auto; font-size: 12px; color: var(--leise); }
.listen a.drueber { box-shadow: inset 0 2px 0 var(--akzent); }

.neu input { width: 100%; border: 1px solid transparent; background: transparent; padding: 7px 10px; border-radius: 8px; outline: none; }
.neu input:focus { background: var(--flaeche); border-color: var(--linie); }
.neu input::placeholder { color: var(--leise); }
.geraet { margin-top: auto; font-size: 11px; color: var(--leise); padding: 0 10px; }

.haupt { padding: 36px clamp(16px, 5vw, 64px); max-width: 860px; width: 100%; }
.kopf { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.kopf h1 { font-size: 26px; margin: 0; outline: none; border-radius: 6px; padding: 2px 6px; margin-left: -6px; }
.kopf h1:focus { background: var(--flaeche); box-shadow: var(--schatten); }
.still { margin-left: auto; border: 0; background: none; color: var(--leise); cursor: pointer; font-size: 13px; padding: 6px 8px; border-radius: 6px; }
.still:hover { color: var(--akzent); background: var(--akzent-weich); }
.neu.gross input { background: var(--flaeche); border: 1px solid var(--linie); padding: 11px 14px; border-radius: 10px; box-shadow: var(--schatten); }
.neu.gross input:focus { border-color: var(--akzent); }

.aufgaben { list-style: none; margin: 10px 0 0; padding: 0; }
.aufgabe { display: flex; align-items: center; gap: 12px; padding: 10px 6px; border-bottom: 1px solid var(--linie); background: var(--grund); }
.aufgabe.zieht { opacity: .4; }
.aufgabe.drueber { box-shadow: inset 0 2px 0 var(--akzent); }
.griff { cursor: grab; color: var(--leise); opacity: 0; user-select: none; width: 12px; }
.aufgabe:hover .griff { opacity: .7; }
.haken { appearance: none; width: 20px; height: 20px; border: 2px solid var(--leise); border-radius: 50%; margin: 0; cursor: pointer; flex: none; display: grid; place-items: center; transition: .15s; }
.haken:hover { border-color: var(--gut); }
.haken:checked { background: var(--gut); border-color: var(--gut); }
.haken:checked::after { content: "✓"; color: #fff; font-size: 12px; font-weight: 700; }
.text { flex: 1; outline: none; border-radius: 4px; padding: 1px 4px; min-width: 0; overflow-wrap: anywhere; }
.text:focus { background: var(--flaeche); box-shadow: var(--schatten); }
.erledigt .text { color: var(--leise); text-decoration: line-through; }
.weg { border: 0; background: none; color: var(--leise); cursor: pointer; opacity: 0; font-size: 16px; padding: 2px 6px; border-radius: 6px; }
.aufgabe:hover .weg { opacity: 1; }
.weg:hover { color: var(--akzent); background: var(--akzent-weich); }
.erledigt { margin-top: 22px; }
.erledigt summary { cursor: pointer; color: var(--leise); font-size: 13px; font-weight: 600; padding: 4px 0; }
.leer { color: var(--leise); text-align: center; margin-top: 48px; }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--text); color: var(--grund); padding: 10px 16px; border-radius: 10px; box-shadow: var(--schatten); max-width: min(520px, calc(100% - 32px)); }
.kaputt { padding: 48px 24px; text-align: center; color: var(--akzent); }

.neu .privat, .privat { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--leise); padding: 2px 10px; }
.neu .privat input, .privat input { width: auto; }
.konto { margin-top: auto; border-top: 1px solid var(--linie); padding-top: 10px; }
.konto-name { font-size: 13px; font-weight: 600; padding: 0 10px; overflow-wrap: anywhere; }
.konto-knoepfe { display: flex; flex-wrap: wrap; gap: 2px; }
.konto-knoepfe .still { margin-left: 0; }
.geraet { margin-top: 0; }

.mitte { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.meta { display: flex; flex-wrap: wrap; gap: 6px; }
.meta:empty { display: none; }
.chip { font-size: 12px; color: var(--gut); padding: 0 6px; border-radius: 99px; background: color-mix(in srgb, var(--gut) 12%, transparent); }
.chip.ueberfaellig { color: var(--akzent); background: var(--akzent-weich); }
.chip.leise { color: var(--leise); background: color-mix(in srgb, var(--leise) 14%, transparent); }
.termin { border: 0; background: none; cursor: pointer; opacity: 0; font-size: 14px; padding: 2px 6px; border-radius: 6px; }
.aufgabe:hover .termin { opacity: .8; }
.aufgabe { flex-wrap: wrap; }
.editor { flex-basis: 100%; display: flex; flex-wrap: wrap; gap: 8px; padding: 6px 0 2px 44px; }
.editor input, .editor select { border: 1px solid var(--linie); background: var(--flaeche); border-radius: 8px; padding: 5px 8px; }
.editor .still { margin-left: 0; }

.anmeldung { position: fixed; inset: 0; background: var(--grund); display: grid; place-items: center; padding: 16px; z-index: 10; }
.anmeldung[hidden] { display: none; }
.karte { background: var(--flaeche); color: var(--text); border: 1px solid var(--linie); border-radius: 14px; box-shadow: var(--schatten); padding: 22px; width: min(420px, 100%); }
.karte h2 { margin: 6px 0 4px; font-size: 20px; }
.karte h3 { margin: 16px 0 6px; font-size: 13px; color: var(--leise); text-transform: uppercase; letter-spacing: .04em; }
.karte input[type=text], .karte input:not([type]), .karte input[type=password], .karte input[type=file], .karte select { width: 100%; border: 1px solid var(--linie); background: var(--grund); border-radius: 8px; padding: 9px 12px; margin-top: 8px; }
.karte input[hidden] { display: none; }
.hinweis { color: var(--leise); font-size: 13px; margin: 4px 0; }
.gross-knopf { margin-top: 12px; border: 0; background: var(--akzent); color: #fff; border-radius: 8px; padding: 9px 16px; font-weight: 600; cursor: pointer; }
.gross-knopf:disabled { opacity: .5; }
.link { margin: 10px 0 0; padding-left: 0; }
.schlicht { list-style: none; margin: 0; padding: 0; font-size: 14px; }
.schlicht li { padding: 4px 0; border-bottom: 1px solid var(--linie); overflow-wrap: anywhere; }
.zeile { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.zeile input, .zeile select { flex: 1; min-width: 120px; }
dialog.karte::backdrop { background: rgba(0,0,0,.4); }

.listen .zahl.achtung { color: #fff; background: var(--akzent); font-weight: 700; padding: 0 7px; border-radius: 99px; }
#konflikte h1 { font-size: 26px; margin: 0 0 14px; }
.tabelle { width: 100%; border-collapse: collapse; font-size: 14px; margin-bottom: 14px; }
.tabelle th { text-align: left; color: var(--leise); font-weight: 600; padding: 8px 10px; border-bottom: 1px solid var(--linie); }
.tabelle td { padding: 9px 10px; border-bottom: 1px solid var(--linie); overflow-wrap: anywhere; vertical-align: top; }
.tabelle td.id { font-family: ui-monospace, Consolas, monospace; color: var(--leise); }
.tabelle tr.klick { cursor: pointer; }
.tabelle tr.klick:hover { background: color-mix(in srgb, var(--text) 5%, transparent); }
.annehmen { border: 1px solid var(--linie); background: var(--flaeche); border-radius: 8px; padding: 5px 10px; cursor: pointer; white-space: nowrap; }
.annehmen:hover { border-color: var(--gut); color: var(--gut); }
.still:disabled { opacity: .5; cursor: not-allowed; }
.zurueck { margin: 0 0 10px; padding-left: 0; }

@media (max-width: 700px) {
  .termin { opacity: .6; }
  .app { grid-template-columns: 1fr; }
  .seite { border-right: 0; border-bottom: 1px solid var(--linie); }
  .haupt { padding: 20px 16px; }
  .griff, .weg { opacity: .6; }
}
