/* akse To-dos – Gestaltung
   Schrift: Atkinson Hyperlegible (für gute Lesbarkeit entwickelt), lokal ausgeliefert. */

@font-face {
  font-family: "Atkinson";
  src: url("fonts/atkinson-hyperlegible-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Atkinson";
  src: url("fonts/atkinson-hyperlegible-latin-700-normal.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}

:root {
  color-scheme: light;
  --papier: #F5F7FA;
  --flaeche: #FFFFFF;
  --tinte: #1F2A44;
  --tinte-2: #55627A;
  --tinte-3: #8A94A8;
  --linie: #DCE1EA;
  --linie-2: #EBEEF3;
  --akzent: #2B55C9;
  --akzent-hell: #E8EEFC;
  --marker: #FFE873;
  --marker-hell: #FFFAE0;
  --rot: #C62828;
  --rot-hell: #FDECEC;
  --gruen: #1E7A4E;
  --frei: #EEF1F5;
  --radius: 10px;
  --schrift: "Atkinson", -apple-system, "Segoe UI", system-ui, sans-serif;
  --fokus: 0 0 0 3px #FFFFFF, 0 0 0 5px var(--akzent);
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--papier);
  color: var(--tinte);
  font-family: var(--schrift);
  font-size: 16px;
  line-height: 1.45;
  min-height: 100vh;
}

.sprite { display: none; }

h1, h2, h3 { margin: 0; line-height: 1.2; }
h1 { font-size: 1.5rem; font-weight: 700; }
h2 { font-size: 1rem; font-weight: 700; }
h3 { font-size: 0.95rem; font-weight: 700; }
p { margin: 0 0 0.75em; }

a { color: var(--akzent); }

:focus { outline: none; }
:focus-visible { box-shadow: var(--fokus); border-radius: 6px; }

svg.ic {
  width: 1.15em; height: 1.15em;
  fill: none; stroke: currentColor; stroke-width: 1.8;
  stroke-linecap: round; stroke-linejoin: round;
  flex: none; vertical-align: -0.2em;
}
#i-mehr circle { fill: currentColor; stroke: none; }

.unsichtbar {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* ---------- Knöpfe und Felder ---------- */

button, input, select, textarea { font: inherit; color: inherit; }

.knopf {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.4em;
  min-height: 40px; padding: 0 14px;
  border: 1px solid var(--linie); border-radius: 8px;
  background: var(--flaeche); color: var(--tinte);
  font-weight: 700; font-size: 0.95rem; text-decoration: none;
  cursor: pointer; white-space: nowrap;
}
.knopf:hover { border-color: var(--tinte-3); }
.knopf.haupt { background: var(--akzent); border-color: var(--akzent); color: #fff; }
.knopf.haupt:hover { background: #2349B0; }
.knopf.gefahr { color: var(--rot); }
.knopf.gefahr.bestaetigen { background: var(--rot); border-color: var(--rot); color: #fff; }
.knopf.gross { min-height: 48px; padding: 0 22px; font-size: 1rem; }
.knopf.klein { min-height: 32px; padding: 0 10px; font-size: 0.875rem; }
.knopf.rund { width: 40px; padding: 0; }
.knopf[disabled] { opacity: 0.5; cursor: default; }

.symbolknopf {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border: 0; border-radius: 8px;
  background: transparent; color: var(--tinte-2); cursor: pointer;
}
.symbolknopf:hover { background: var(--linie-2); color: var(--tinte); }

.feld { display: grid; gap: 4px; margin-bottom: 14px; align-content: start; }
.feld > span, .feldtitel { font-size: 0.875rem; font-weight: 700; color: var(--tinte-2); }
.feld > span.hilfe { font-weight: 400; }
.feld input:not([type=checkbox]):not([type=radio]):not([type=color]), .feld select, .feld textarea, .eingabe {
  width: 100%; min-height: 42px; padding: 8px 10px;
  border: 1px solid var(--linie); border-radius: 8px; background: var(--flaeche);
}
.feld textarea { min-height: 90px; resize: vertical; }
.feld input:focus-visible, .feld select:focus-visible, .feld textarea:focus-visible, .eingabe:focus-visible {
  border-color: var(--akzent); box-shadow: 0 0 0 3px var(--akzent-hell);
}
.feld .hilfe { font-size: 0.85rem; color: var(--tinte-2); }
.feldreihe { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; align-items: start; }
.feldreihe > .haekchen { margin-top: 30px; }
.haekchen { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; cursor: pointer; }
.haekchen input { width: 20px; height: 20px; accent-color: var(--akzent); }

.wahl { display: flex; flex-wrap: wrap; gap: 6px; border: 0; padding: 0; margin: 0 0 14px; }
.wahl legend { font-size: 0.875rem; font-weight: 700; color: var(--tinte-2); margin-bottom: 4px; padding: 0; }
.wahl label {
  display: inline-flex; align-items: center; min-height: 38px; padding: 0 12px;
  border: 1px solid var(--linie); border-radius: 999px; background: var(--flaeche); cursor: pointer;
}
.wahl input { position: absolute; opacity: 0; pointer-events: none; }
.wahl input:checked + span { font-weight: 700; }
.wahl label:has(input:checked) { border-color: var(--akzent); background: var(--akzent-hell); color: var(--akzent); }
.wahl label:has(input:focus-visible) { box-shadow: var(--fokus); }

.meldung { padding: 10px 12px; border-radius: 8px; background: var(--akzent-hell); }
.meldung.fehler { background: var(--rot-hell); color: var(--rot); }
.klein { font-size: 0.875rem; color: var(--tinte-2); }
.leer { color: var(--tinte-3); font-size: 0.9rem; padding: 6px 0; margin: 0; }

/* ---------- Kopfzeile ---------- */

.kopf {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 28px;
  padding: 0 24px; padding-top: env(safe-area-inset-top);
  background: var(--papier); border-bottom: 1px solid var(--linie);
}
.marke {
  font-weight: 700; font-size: 1.15rem; color: var(--tinte); text-decoration: none;
  padding: 14px 0; letter-spacing: -0.01em;
}
.hauptnav { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; }
.hauptnav::-webkit-scrollbar { display: none; }
.hauptnav a {
  padding: 16px 10px 14px; color: var(--tinte-2); text-decoration: none;
  font-weight: 700; font-size: 0.95rem; white-space: nowrap;
  border-bottom: 3px solid transparent;
}
.hauptnav a:hover { color: var(--tinte); }
.hauptnav a[aria-current="page"] { color: var(--tinte); border-bottom-color: var(--tinte); }

main#inhalt { padding: 20px 24px 60px; max-width: 1500px; margin: 0 auto; }
main#inhalt:focus, main#inhalt:focus-visible { box-shadow: none; }
.laden { color: var(--tinte-3); }

.seitenkopf { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.seitenkopf h1 { margin-right: auto; }
.schmal { max-width: 760px; }

/* ---------- Wochenansicht ---------- */

.wochenkopf { display: flex; align-items: center; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.wochenkopf h1 { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin: 0 6px; }
.wochenkopf h1 small { font-size: 1rem; font-weight: 400; color: var(--tinte-2); }
.wochenkopf .rechts { margin-left: auto; display: flex; gap: 8px; align-items: center; }

.raster { display: grid; grid-template-columns: 270px 1fr; gap: 16px; align-items: start; }
.wochenteil { display: grid; gap: 14px; min-width: 0; }
.tage { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)) 44px; gap: 10px; }
.tage.mit-we { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.wochenende.zu { display: flex; }
.wochenende .aufklapper {
  display: flex; flex-direction: column; align-items: center; gap: 10px; width: 100%; padding: 12px 0;
  border: 1px dashed var(--linie); border-radius: var(--radius); background: transparent; cursor: pointer;
  color: var(--tinte-2); font-weight: 700;
}
.wochenende .aufklapper:hover { color: var(--tinte); background: var(--linie-2); }
.wochenende .senkrecht { writing-mode: vertical-rl; transform: rotate(180deg); font-size: 0.95rem; }
.wochenende.auf { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; min-width: 0; }
.wochenende.auf .we-kopf { grid-column: 1 / -1; justify-self: start; }
.wochenende .we-kopf {
  display: flex; align-items: center; justify-content: space-between; gap: 6px; min-height: 30px; padding: 0 8px;
  border: 0; border-radius: 6px; background: none; color: var(--tinte-2); font-weight: 700; cursor: pointer;
}
.wochenende .we-kopf:hover { background: var(--linie-2); color: var(--tinte); }
.wochenende .tag { min-height: 140px; }

.spalte {
  background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--radius);
  padding: 12px 12px 10px; min-width: 0;
}
.spalte > header { display: flex; align-items: center; gap: 6px; min-height: 30px; margin-bottom: 6px; }
.spalte > header h2 { margin-right: auto; }
.zaehler { font-size: 0.85rem; color: var(--tinte-3); font-weight: 400; }

.sammel { position: sticky; top: 70px; max-height: calc(100vh - 90px); overflow: auto; }
.raster.sammel-zu { grid-template-columns: 52px 1fr; }
.sammel.zu { padding: 0; overflow: visible; position: sticky; display: flex; flex-direction: column; min-height: 260px; }
.sammel.zu .aufklapper {
  display: flex; flex-direction: column; align-items: center; gap: 10px; width: 100%; padding: 12px 0;
  border: 0; background: none; cursor: pointer; color: var(--tinte-2); font-weight: 700; border-radius: var(--radius);
}
.sammel.zu .aufklapper:hover { color: var(--tinte); background: var(--linie-2); }
.sammel.zu .senkrecht { writing-mode: vertical-rl; transform: rotate(180deg); font-size: 0.95rem; }
.sammel.zu .zaehler { font-weight: 700; color: var(--tinte-2); }
.sammel.zu .ablage { flex: 1; min-height: 80px; margin: 0 4px 6px; border-radius: 8px; }
.sammel.zu .ablage .aufgabe { display: none; }
.sammel.zu .ablage:has(.sortable-ghost) { background: var(--akzent-hell); outline: 2px dashed var(--akzent); }

.block-dringend { border-color: #F0C4C4; background: #FFFBFB; }
.block-dringend > header h2 { color: var(--rot); }

/* Tagesspalten */
.tag { padding: 10px 8px 8px; display: flex; flex-direction: column; min-height: 220px; }
.tagkopf {
  display: flex; flex-direction: column; align-items: flex-start; gap: 0;
  width: 100%; padding: 4px 6px; margin: -4px 0 6px;
  border: 0; border-radius: 6px; background: transparent; text-align: left; cursor: pointer;
}
.tagkopf:hover { background: var(--linie-2); }
.tagkopf .wt { font-weight: 700; font-size: 1rem; }
.tagkopf .dt { font-size: 0.85rem; color: var(--tinte-2); }
.tagkopf .frei-label { font-size: 0.85rem; font-weight: 700; color: var(--tinte-2); margin-top: 2px; }

/* Das Erkennungszeichen: der heutige Tag wie mit Textmarker hervorgehoben */
.tag.heute { background: var(--marker-hell); border-color: #EBD77A; }
.tag.heute .tagkopf .wt {
  background: linear-gradient(100deg, transparent 0 2%, var(--marker) 4% 94%, transparent 97%);
  background-size: 100% 62%; background-position: 0 85%; background-repeat: no-repeat;
  padding: 0 4px; margin-left: -4px;
}
.tag.vergangen .tagkopf .wt, .tag.vergangen .tagkopf .dt { color: var(--tinte-3); }
.tag.frei {
  background: repeating-linear-gradient(135deg, var(--frei) 0 8px, #F6F8FA 8px 16px);
  border-style: dashed;
}

/* ---------- Aufgabenlisten ---------- */

.liste { list-style: none; margin: 0; padding: 0; min-height: 36px; flex: 1; }
.liste:empty::after {
  content: attr(data-leer); display: block; padding: 8px 4px;
  color: var(--tinte-3); font-size: 0.875rem;
}

.aufgabe {
  position: relative; display: grid; grid-template-columns: auto 1fr auto; gap: 8px; align-items: start;
  padding: 7px 4px 7px 10px; border-radius: 7px; background: var(--flaeche);
  border: 1px solid var(--linie-2); margin-bottom: 5px;
}
.aufgabe::before {
  content: ""; position: absolute; left: 0; top: 6px; bottom: 6px; width: 4px;
  border-radius: 0 3px 3px 0; background: var(--kat, transparent);
}
.tag .aufgabe, .block-woche .aufgabe { background: var(--flaeche); }
.aufgabe:hover { border-color: var(--linie); }
.aufgabe .haken {
  appearance: none; -webkit-appearance: none; margin: 2px 0 0;
  width: 20px; height: 20px; border: 2px solid var(--tinte-3); border-radius: 50%;
  background: var(--flaeche); cursor: pointer; display: grid; place-content: center;
}
.aufgabe .haken:hover { border-color: var(--gruen); }
.aufgabe .haken:checked { background: var(--gruen); border-color: var(--gruen); }
.aufgabe .haken:checked::after {
  content: ""; width: 9px; height: 5px; margin-top: -2px;
  border: solid #fff; border-width: 0 0 2px 2px; transform: rotate(-45deg);
}
.aufgabe .haken:focus-visible { box-shadow: var(--fokus); }
.aufgabe .text { min-width: 0; }
.aufgabe .titel {
  display: block; width: 100%; padding: 0; border: 0; background: none; text-align: left;
  font-size: 0.95rem; line-height: 1.35; cursor: pointer;
  overflow-wrap: break-word; -webkit-hyphens: manual; hyphens: manual;
}
.aufgabe .meta {
  display: flex; flex-wrap: wrap; align-items: center; gap: 2px 8px; margin-top: 2px;
  font-size: 0.8rem; color: var(--tinte-2);
}
.aufgabe .meta span { display: inline-flex; align-items: center; gap: 3px; }
.aufgabe .meta .ic { width: 14px; height: 14px; }
.aufgabe .meta .projektname { color: var(--tinte-2); }
.aufgabe .meta .spaet { color: var(--rot); font-weight: 700; }
.aufgabe .mehr { width: 30px; height: 30px; margin: -4px -2px 0 0; }

.aufgabe.dringend .titel { color: var(--rot); font-weight: 700; }
.aufgabe.dringend { border-color: #F3D0D0; }

.aufgabe.erledigt { background: transparent; border-color: transparent; }
.aufgabe.erledigt .titel { text-decoration: line-through; color: var(--tinte-3); font-weight: 400; }
.aufgabe.erledigt::before { opacity: 0.35; }
.aufgabe.erledigt .meta { opacity: 0.7; }

.aufgabe.vorschau { background: transparent; border-style: dashed; border-color: var(--linie); color: var(--tinte-3); }
.aufgabe.vorschau .titel { color: var(--tinte-3); cursor: default; }
.aufgabe.vorschau::before { opacity: 0.4; }
.aufgabe .platzhalter { width: 20px; height: 20px; display: grid; place-content: center; color: var(--tinte-3); }

.sortable-ghost { opacity: 0.35; }
.sortable-chosen { box-shadow: 0 6px 18px rgba(31, 42, 68, 0.16); }
.ziehbar .aufgabe:not(.vorschau) { cursor: grab; }

.schnell { display: flex; gap: 6px; margin-bottom: 8px; }
.schnell input {
  flex: 1; min-width: 0; min-height: 38px; padding: 6px 10px;
  border: 1px solid var(--linie); border-radius: 8px; background: var(--papier);
}
.schnell input:focus-visible { border-color: var(--akzent); background: var(--flaeche); box-shadow: 0 0 0 3px var(--akzent-hell); }
.tag .schnell { margin: 4px 0 0; order: 3; }
.tag .schnell input { min-height: 34px; font-size: 0.9rem; background: transparent; border-style: dashed; }
.tag .schnell input:focus { border-style: solid; background: var(--flaeche); }

/* ---------- Tagesansicht: eine ruhige, durchgehende Liste ---------- */

.tagesrahmen > .wochenkopf { max-width: 820px; margin-left: auto; margin-right: auto; }
.tagesansicht { max-width: 820px; margin: 0 auto; }
.tagesrahmen > .wochenkopf { margin-bottom: 26px; }
.abschnitt-tag { margin-bottom: 30px; }
.abschnitt-tag > h2 { font-size: 1.2rem; padding-bottom: 8px; margin-bottom: 4px; border-bottom: 2px solid var(--tinte); }
.dringend-tag > h2 { color: var(--rot); border-bottom-color: var(--rot); }
.ist-heute > h2 .markiert {
  background: linear-gradient(100deg, transparent 0 1%, var(--marker) 3% 95%, transparent 98%);
  background-size: 100% 60%; background-position: 0 85%; background-repeat: no-repeat; padding: 0 6px; margin-left: -6px;
}
.liste.ruhig { min-height: 48px; }
.liste.ruhig .aufgabe {
  border: 0; border-bottom: 1px solid var(--linie); border-radius: 0; background: transparent;
  margin: 0; padding: 13px 4px 13px 18px; gap: 12px;
}
.liste.ruhig .aufgabe::before { top: 12px; bottom: 12px; width: 4px; border-radius: 2px; }
.liste.ruhig .aufgabe .titel { font-size: 1.06rem; }
.liste.ruhig .aufgabe .haken { width: 22px; height: 22px; margin-top: 1px; }
.liste.ruhig .aufgabe.vorschau { border-bottom-style: dashed; }
.liste.ruhig .aufgabe:hover { background: var(--flaeche); }
.liste.ruhig:empty::after { padding: 14px 4px; font-size: 0.95rem; }
.aufgabe .notiztext {
  margin-top: 4px; font-size: 0.9rem; color: var(--tinte-2); white-space: pre-wrap; overflow-wrap: break-word;
  display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden;
}
.abschnitt-tag .schnell, .klappe .schnell { margin-top: 10px; }
.abschnitt-tag .meldung { margin: 10px 0 4px; }

.klappe { border-top: 1px solid var(--linie); }
.klappe:last-child { border-bottom: 1px solid var(--linie); }
.klappe > summary {
  display: flex; align-items: center; gap: 8px; min-height: 52px; cursor: pointer;
  font-weight: 700; font-size: 1.05rem; color: var(--tinte-2); list-style: none;
}
.klappe > summary::-webkit-details-marker { display: none; }
.klappe > summary::before {
  content: ""; width: 8px; height: 8px; border: solid var(--tinte-3); border-width: 0 2px 2px 0;
  transform: rotate(-45deg); margin: 0 6px 0 4px; transition: transform 0.15s;
}
.klappe[open] > summary::before { transform: rotate(45deg); }
.klappe > summary:hover { color: var(--tinte); }
.klappe-inhalt { padding-bottom: 18px; }

/* ---------- Stufe 2/3: Abspielen, Eingänge, Weitergegeben ---------- */

.aufgabe .meta .abspielen {
  display: inline-flex; align-items: center; gap: 4px; min-height: 26px; padding: 0 8px;
  border: 1px solid var(--linie); border-radius: 999px; background: var(--flaeche);
  font-size: 0.8rem; font-weight: 700; color: var(--akzent); cursor: pointer;
}
.aufgabe .meta .abspielen[aria-pressed="true"] { background: var(--akzent-hell); border-color: var(--akzent); }
.aufgabe .meta .von { color: var(--akzent); font-weight: 700; }
#i-play path { fill: currentColor; }
dialog audio { width: 100%; }
.eingaenge h3 { display: flex; align-items: center; gap: 6px; margin: 16px 0 6px; }
.eingaenge h3:first-of-type { margin-top: 4px; }
.knopfreihe { display: flex; gap: 8px; flex-wrap: wrap; }
.code { font-size: 2rem; font-weight: 700; letter-spacing: 0.12em; font-variant-numeric: tabular-nums; margin: 6px 0 10px; }
.code.klein-code { font-size: 0.95rem; letter-spacing: 0; overflow-wrap: anywhere; padding: 10px 12px; background: var(--papier); border: 1px solid var(--linie); border-radius: 8px; }
.anleitung { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--linie-2); }
.anleitung ol { padding-left: 1.3em; margin: 8px 0 0; }
.anleitung li { margin-bottom: 10px; }
.anleitung code { font-size: 0.85rem; overflow-wrap: anywhere; }
.mailvorschau { white-space: pre-wrap; font-family: var(--schrift); font-size: 0.92rem; background: var(--papier); border: 1px solid var(--linie); border-radius: 8px; padding: 12px 14px; margin: 0; }
.zeitfeld input { max-width: 140px; }
.wahl.senkrecht { flex-direction: column; align-items: flex-start; }
.marke-klein.gruen { background: #E3F3EA; color: var(--gruen); }
.zeilenliste .erledigt-zeile .titel { color: var(--tinte-3); text-decoration: line-through; font-weight: 400; }

/* ---------- Menü ---------- */

.menue {
  position: fixed; z-index: 50; min-width: 270px; max-width: calc(100vw - 16px);
  max-height: calc(100vh - 16px); overflow: auto;
  padding: 6px; background: var(--flaeche); border: 1px solid var(--linie); border-radius: 10px;
  box-shadow: 0 12px 32px rgba(31, 42, 68, 0.18);
}
.menue button {
  display: flex; align-items: center; gap: 8px; width: 100%; min-height: 40px; padding: 0 10px;
  border: 0; border-radius: 6px; background: none; text-align: left; cursor: pointer;
}
.menue button:hover, .menue button:focus-visible { background: var(--akzent-hell); box-shadow: none; }
.menue button.gefahr { color: var(--rot); }
.menue button.aktiv { font-weight: 700; }
.menue hr { border: 0; border-top: 1px solid var(--linie-2); margin: 4px 0; }
.menue .menuetitel { padding: 6px 10px 2px; font-size: 0.8rem; font-weight: 700; color: var(--tinte-3); }
.menue .tagreihe { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; padding: 2px 4px 4px; }
.menue .tagreihe button.frei { color: var(--tinte-3); background: repeating-linear-gradient(135deg, var(--frei) 0 5px, #F6F8FA 5px 10px); }
.menue .tagreihe button { justify-content: center; padding: 0; min-height: 40px; border: 1px solid var(--linie-2); }
.menue .tagreihe button.aktiv { background: var(--akzent-hell); border-color: var(--akzent); color: var(--akzent); }
.menue .tagreihe button[disabled] { opacity: 0.35; cursor: default; }

/* ---------- Dialog ---------- */

dialog {
  width: min(560px, calc(100vw - 24px)); max-height: calc(100vh - 32px);
  padding: 0; border: 0; border-radius: 14px; color: var(--tinte); background: var(--flaeche);
  box-shadow: 0 24px 60px rgba(31, 42, 68, 0.28);
}
dialog::backdrop { background: rgba(31, 42, 68, 0.35); }
dialog form { display: flex; flex-direction: column; max-height: calc(100vh - 32px); }
.dlg-kopf { display: flex; align-items: center; gap: 8px; padding: 18px 20px 6px; }
.dlg-kopf h2 { font-size: 1.15rem; margin-right: auto; }
.dlg-inhalt { padding: 10px 20px 6px; overflow: auto; }
.dlg-fuss {
  display: flex; gap: 8px; flex-wrap: wrap; padding: 14px 20px 18px; border-top: 1px solid var(--linie-2);
}
.dlg-fuss .links { margin-right: auto; }
.dlg-info { font-size: 0.85rem; color: var(--tinte-2); margin: 0 0 14px; }
.hinweisliste { margin: 0 0 14px; padding-left: 1.2em; }
.hinweisliste li { margin-bottom: 6px; }

/* ---------- Toast ---------- */

.toast {
  position: fixed; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom)); transform: translateX(-50%);
  z-index: 60; max-width: calc(100vw - 32px); padding: 12px 16px; border-radius: 10px;
  background: var(--tinte); color: #fff; font-weight: 700; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}
.toast.fehler { background: var(--rot); }

/* ---------- Projekte ---------- */

.projektgruppe { margin-bottom: 22px; }
.projektgruppe > h2 { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; color: var(--tinte-2); }
.punkt { width: 10px; height: 10px; border-radius: 50%; background: var(--kat, var(--tinte-3)); flex: none; }
.projektliste { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.projektzeile {
  display: grid; grid-template-columns: 1fr minmax(140px, 220px); gap: 6px 18px; align-items: center;
  padding: 12px 14px; background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--radius);
  text-decoration: none; color: inherit; border-left: 4px solid var(--kat, var(--linie));
}
.projektzeile:hover { border-color: var(--tinte-3); border-left-color: var(--kat, var(--tinte-3)); }
.projektzeile .titel { font-weight: 700; }
.projektzeile .unter { font-size: 0.85rem; color: var(--tinte-2); }
.projektzeile.teil { margin-left: 28px; border-left-width: 2px; }
.fortschritt { display: grid; gap: 4px; font-size: 0.85rem; color: var(--tinte-2); }
.balken { height: 8px; border-radius: 4px; background: var(--linie-2); overflow: hidden; }
.balken > span { display: block; height: 100%; background: var(--gruen); border-radius: 4px; }

.projektkopf { border-left: 5px solid var(--kat, var(--linie)); padding-left: 14px; margin-bottom: 20px; }
.projektkopf .zeile { display: flex; flex-wrap: wrap; gap: 6px 16px; color: var(--tinte-2); margin-top: 6px; }
.projektkopf .fortschritt { max-width: 320px; margin-top: 10px; }
.projektkopf .notiz { margin-top: 10px; white-space: pre-wrap; max-width: 70ch; }
.projektabschnitt { margin-bottom: 18px; max-width: 760px; }
.projektabschnitt > header { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.projektabschnitt > header h2 { margin-right: auto; }
.ort { color: var(--tinte-2); }

details.archiv { margin-top: 26px; }
details.archiv summary { cursor: pointer; font-weight: 700; color: var(--tinte-2); padding: 6px 0; }

/* ---------- Wiederholungen, Freie Tage, Einstellungen ---------- */

.zeilenliste { list-style: none; margin: 0; padding: 0; background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--radius); }
.zeilenliste > li { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-top: 1px solid var(--linie-2); }
.zeilenliste > li:first-child { border-top: 0; }
.zeilenliste .haupt { flex: 1; min-width: 0; }
.zeilenliste .titel { font-weight: 700; }
.zeilenliste .unter { font-size: 0.875rem; color: var(--tinte-2); }
.zeilenliste button.zeilenknopf { all: unset; display: block; cursor: pointer; flex: 1; min-width: 0; }
.zeilenliste button.zeilenknopf:focus-visible { box-shadow: var(--fokus); border-radius: 6px; }
.zeilenliste .pausiert { opacity: 0.6; }
.marke-klein { display: inline-block; padding: 1px 8px; border-radius: 999px; background: var(--linie-2); font-size: 0.8rem; font-weight: 700; color: var(--tinte-2); }

.zweispaltig { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 28px; align-items: start; }
.karte { background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--radius); padding: 16px 18px; }
.karte > h2 { margin-bottom: 12px; }
.abschnitt { margin-bottom: 28px; }
.abschnitt > h2 { margin-bottom: 10px; }

.feiertage { list-style: none; margin: 0; padding: 0; columns: 2; column-gap: 20px; font-size: 0.9rem; }
.feiertage li { break-inside: avoid; padding: 3px 0; color: var(--tinte-2); }
.feiertage li b { color: var(--tinte); font-weight: 700; display: inline-block; min-width: 7.5em; }
.feiertage li.vorbei { opacity: 0.5; }

.kategorien { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 6px; }
.kategorien li { display: grid; grid-template-columns: 44px 1fr auto auto auto; gap: 6px; align-items: center; }
.kategorien li.archiviert { opacity: 0.55; }
.kategorien input[type=color] { width: 44px; height: 40px; padding: 2px; border: 1px solid var(--linie); border-radius: 8px; background: var(--flaeche); cursor: pointer; }

/* ---------- Tätigkeitsbericht ---------- */

.umschalter { display: inline-flex; border: 1px solid var(--linie); border-radius: 8px; overflow: hidden; background: var(--flaeche); }
.umschalter button { min-height: 38px; padding: 0 14px; border: 0; background: none; font-weight: 700; cursor: pointer; color: var(--tinte-2); }
.umschalter button[aria-pressed="true"] { background: var(--tinte); color: #fff; }
.berichtnav { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-bottom: 18px; }
.berichtnav .zeitraum { font-weight: 700; font-size: 1.05rem; margin: 0 6px; min-width: 12em; text-align: center; }
.berichtnav .rechts { margin-left: auto; display: flex; gap: 8px; }
.bericht { max-width: 760px; }
.bericht .drucktitel { display: none; }
.bericht .summe { color: var(--tinte-2); margin-bottom: 16px; }
.berichttag { margin-bottom: 22px; }
.berichttag > h2 { font-size: 1.05rem; padding-bottom: 6px; border-bottom: 1px solid var(--linie); margin-bottom: 10px; }
.berichtkat { margin-bottom: 12px; }
.berichtkat > h3 { display: flex; align-items: center; gap: 8px; color: var(--tinte-2); margin-bottom: 4px; }
.berichtkat ul { list-style: none; margin: 0; padding: 0 0 0 18px; }
.berichtkat li { display: grid; grid-template-columns: 3.4em 1fr; gap: 8px; padding: 3px 0; }
.berichtkat .zeit { color: var(--tinte-3); font-variant-numeric: tabular-nums; }
.berichtkat .proj { color: var(--tinte-2); font-size: 0.875rem; }

/* ---------- Anmeldung ---------- */

body.einfach { display: grid; place-items: center; padding: 24px; }
.anmeldung { width: min(420px, 100%); background: var(--flaeche); border: 1px solid var(--linie); border-radius: 14px; padding: 32px 28px; }
.anmeldung h1 { font-size: 2rem; margin-bottom: 6px; }
.anmeldung form { margin: 18px 0 10px; }
.anmeldung .knopf { width: 100%; margin-top: 12px; }

/* ---------- Schmale Bildschirme ---------- */

@media (max-width: 1180px) {
  .raster { grid-template-columns: 250px 1fr; }
  .tage { gap: 8px; }
}

@media (max-width: 900px) {
  body { font-size: 17px; }
  .kopf { gap: 8px; padding: 0 12px; padding-top: env(safe-area-inset-top); flex-wrap: wrap; }
  .marke { padding: 10px 0 0; }
  .hauptnav { width: 100%; margin: 0 -4px; }
  .hauptnav a { padding: 10px 8px 10px; }
  main#inhalt { padding: 14px 12px calc(60px + env(safe-area-inset-bottom)); }

  /* Auf dem Handy steht alles untereinander: Dringend, heute, übrige Tage, Woche, Sammelliste */
  .raster { display: flex; flex-direction: column; align-items: stretch; gap: 12px; }
  .feldreihe > .haekchen { margin-top: 0; }
  .wochenteil, .tage { display: contents; }
  .block-dringend { order: 1; }
  .tag.heute { order: 2; }
  .tag { order: 3; min-height: 0; }
  .block-woche { order: 4; }
  .sammel { order: 5; position: static; max-height: none; }
  .sammel.zu { min-height: 0; }
  .sammel.zu .aufklapper { flex-direction: row; justify-content: center; padding: 14px 0; }
  .sammel.zu .senkrecht { writing-mode: horizontal-tb; transform: none; }
  .sammel.zu .ablage { display: none; }
  .wochenende { order: 3; }
  .wochenende.auf { display: flex; flex-direction: column; gap: 12px; }
  .wochenende .aufklapper { flex-direction: row; justify-content: center; padding: 14px 0; }
  .wochenende .senkrecht { writing-mode: horizontal-tb; transform: none; }
  .tag.vergangen { order: 6; }
  .tag.frei .liste:empty { display: none; }
  .tag .tagkopf { flex-direction: row; align-items: baseline; gap: 8px; }
  .aufgabe { padding: 9px 4px 9px 12px; }
  .aufgabe .titel { font-size: 1rem; }
  .aufgabe .haken { width: 24px; height: 24px; }
  .aufgabe .mehr { width: 40px; height: 40px; margin: -8px -4px -6px 0; }
  .wochenkopf { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 8px; }
  .wochenkopf h1 { font-size: 1.2rem; margin: 0; flex-direction: column; gap: 0; align-items: center; text-align: center; }
  .wochenkopf h1 small { font-size: 0.9rem; }
  .wochenkopf .rechts { grid-column: 1 / -1; margin-left: 0; justify-content: flex-end; }
  .zweispaltig { grid-template-columns: 1fr; }
  .projektzeile { grid-template-columns: 1fr; }
  .projektzeile.teil { margin-left: 14px; }
  .feiertage { columns: 1; }
  .feldreihe { grid-template-columns: 1fr; gap: 0; }
  .berichtnav .rechts { margin-left: 0; width: 100%; }
  .berichtnav .zeitraum { min-width: 0; flex: 1; }
  .kategorien li { grid-template-columns: 44px 1fr auto; }
  .kategorien li .verschiebeknopf { display: none; }
  dialog { width: 100vw; max-width: 100vw; max-height: 92vh; margin: auto 0 0; border-radius: 16px 16px 0 0; }
  dialog form { max-height: 92vh; }
  .dlg-fuss { padding-bottom: calc(18px + env(safe-area-inset-bottom)); }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

/* ---------- Drucken (Tätigkeitsbericht als PDF) ---------- */

@media print {
  @page { margin: 18mm 16mm; }
  body { background: #fff; font-size: 11pt; }
  .kopf, .berichtnav, .toast, .menue, .seitenkopf { display: none !important; }
  main#inhalt { padding: 0; max-width: none; }
  .bericht .drucktitel { display: block; margin-bottom: 4mm; }
  .bericht .drucktitel h1 { font-size: 16pt; }
  .berichttag { break-inside: avoid-page; }
  .berichtkat { break-inside: avoid; }
  .punkt { print-color-adjust: exact; -webkit-print-color-adjust: exact; }
}
