/* Zentrale · Kiefernwald: tiefes Gruen als Grund, Rinde als Akzent, Glas-Kacheln.
   Bereichsfarben: Marken (WI teal, HWB gold) fuer kleine Kennungen, abgedunkelte Stufen
   fuer Diagrammflaechen (geprueft mit validate_palette.js gegen #16241c, alle Pruefungen bestanden). */

:root {
  --grund: #0c1410;
  --grund-2: #111c16;
  --wald: #1a2d22;
  --nadel: #7fa889;
  --moos: #b4c7ad;
  --rinde: #b07c50;
  --rinde-hell: #cf9d70;
  --rinde-tief: #6e4a2f;
  --text: #e7ece3;
  --text-2: #c3cec5;
  --text-3: #a0aea3;
  --linie: rgba(232, 242, 226, 0.12);
  --linie-2: rgba(232, 242, 226, 0.2);
  /* Glas: dunkle Toenung fuer Lesbarkeit, Licht von oben links */
  --glas: rgba(12, 24, 17, 0.46);
  --glas-hoch: rgba(18, 34, 25, 0.56);
  --glas-licht: linear-gradient(140deg, rgba(255, 255, 255, 0.16) 0%, rgba(255, 255, 255, 0.05) 38%, rgba(255, 255, 255, 0.02) 62%, rgba(255, 255, 255, 0.08) 100%);
  --rand-licht: linear-gradient(150deg, rgba(255, 255, 255, 0.55), rgba(255, 255, 255, 0.08) 30%, rgba(255, 255, 255, 0.04) 65%, rgba(255, 255, 255, 0.3));

  /* Kennungen (Marke) */
  --wi: #4bbfad;
  --hwb: #c5a55a;
  --privat: #8ea9da;
  --system: #8d978f;
  /* Diagrammflaechen (validiert, dunkler Grund) */
  --d-wi: #2f9e8e;
  --d-hwb: #ab8a3f;
  --d-privat: #6b8fd6;
  --d-system: #5d665f;

  --warn: #e0a15a;
  --r: 22px;
  --r-klein: 10px;
  --schrift: "Geist", "Segoe UI", system-ui, sans-serif;
  --mono: "Geist Mono", ui-monospace, "Cascadia Mono", monospace;
  --leiste: 80px;
  --kurve: cubic-bezier(0.16, 1, 0.3, 1);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 20px; }
body {
  margin: 0;
  min-height: 100dvh;
  font-family: var(--schrift);
  font-size: 15px;
  line-height: 1.5;
  color: var(--text);
  background-color: #1d2b1f;
  -webkit-font-smoothing: antialiased;
}
/* Foto (dashboard_pic, Dennis 28.10.) als feste Ebene; background-attachment: fixed versagt auf iOS.
   Darueber ein Schleier: oben leichter fuer das Licht, unten dichter fuer die Lesbarkeit. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(8, 16, 11, 0.38) 0%, rgba(8, 16, 11, 0.22) 30%, rgba(8, 16, 11, 0.5) 100%),
    url("wald-gross.webp") center 38% / cover no-repeat;
}
@media (max-width: 960px) {
  body::before {
    background:
      linear-gradient(180deg, rgba(8, 16, 11, 0.42) 0%, rgba(8, 16, 11, 0.3) 30%, rgba(8, 16, 11, 0.56) 100%),
      url("wald-klein.webp") 42% 40% / cover no-repeat;
  }
}
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 50;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='k'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23k)'/%3E%3C/svg%3E");
}

a { color: inherit; }
code { font-family: var(--mono); font-size: 0.86em; background: rgba(255, 255, 255, 0.06); padding: 0.1em 0.4em; border-radius: 5px; }
.ic { width: 20px; height: 20px; flex: none; }
[hidden] { display: none !important; }

/* ---------- Rahmen und Symbolleiste ---------- */
.rahmen {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: var(--leiste) minmax(0, 1fr);
  min-height: 100dvh;
}
.leiste {
  position: sticky;
  top: 14px;
  height: calc(100dvh - 28px);
  margin: 14px 0 14px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  padding: 16px 0;
  border-radius: 26px;
  background: var(--glas-licht), rgba(10, 20, 14, 0.5);
  backdrop-filter: blur(24px) saturate(1.6);
  -webkit-backdrop-filter: blur(24px) saturate(1.6);
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 20px 40px -24px rgba(0, 0, 0, 0.6);
  z-index: 20;
}
.leiste ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.marke { color: var(--rinde-hell); display: grid; place-items: center; width: 40px; height: 40px; margin-bottom: 8px; }
.marke svg { width: 26px; height: 26px; }
.leiste a[data-tip], .leiste button {
  position: relative;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  color: var(--text-3);
  background: transparent;
  border: 0;
  cursor: pointer;
  transition: color 0.2s, background-color 0.2s, transform 0.15s var(--kurve);
}
.leiste a:hover, .leiste button:hover, .leiste a:focus-visible, .leiste button:focus-visible { color: var(--text); background: rgba(255, 255, 255, 0.06); outline: none; }
.leiste a[aria-current="true"] { color: #1c1209; background: linear-gradient(160deg, #e2b88f, var(--rinde-hell)); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45), 0 6px 16px -8px rgba(110, 74, 47, 0.9); }
.leiste a:active, .leiste button:active { transform: scale(0.96); }
.leiste .ab { margin: 0; }

/* Hinweise an Symbolen und Balken */
[data-tip] { position: relative; }
[data-tip]::after {
  content: attr(data-tip);
  position: absolute;
  left: calc(100% + 10px);
  top: 50%;
  transform: translate(-4px, -50%);
  white-space: nowrap;
  font-size: 12.5px;
  padding: 6px 10px;
  border-radius: 8px;
  background: rgba(10, 18, 13, 0.92);
  color: var(--text);
  border: 1px solid var(--linie-2);
  box-shadow: 0 10px 24px -12px rgba(0, 0, 0, 0.7);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s, transform 0.2s var(--kurve);
  z-index: 30;
}
[data-tip]:hover::after, [data-tip]:focus-visible::after { opacity: 1; transform: translate(0, -50%); }

/* ---------- Inhalt ---------- */
.inhalt { padding: 28px clamp(16px, 3vw, 40px) 40px; max-width: 1520px; width: 100%; }
.kopf {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 24px;
  margin-bottom: 22px;
}
.kopf h1 { font-size: 30px; font-weight: 500; letter-spacing: -0.02em; margin: 0 0 6px; text-shadow: 0 2px 12px rgba(0, 0, 0, 0.45); }
.frische { margin: 0; color: var(--text); text-shadow: 0 1px 6px rgba(0, 0, 0, 0.5); font-size: 14px; display: flex; align-items: center; gap: 8px; }
.frische .punkt { width: 8px; height: 8px; border-radius: 50%; background: var(--nadel); box-shadow: 0 0 0 3px rgba(127, 168, 137, 0.18); }
.frische-alt { color: var(--warn); }
.frische-alt .punkt { background: var(--warn); box-shadow: 0 0 0 3px rgba(224, 161, 90, 0.18); }

.woche { padding: 12px 14px 10px; border-radius: 16px; }
.woche ol { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(7, 46px); gap: 6px; }
.woche li { display: grid; justify-items: center; gap: 2px; padding: 7px 0 8px; border-radius: 12px; color: var(--text-2); }
.woche li span { font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.06em; }
.woche li b { font-family: var(--mono); font-weight: 500; font-size: 17px; color: var(--text); }
.woche li.heute { background: linear-gradient(160deg, #e2b88f, var(--rinde-hell)); color: #2a1a0e; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5), 0 8px 18px -10px rgba(110, 74, 47, 0.9); }
.woche .leise .ic { width: 13px; height: 13px; margin: -2px 5px 0 0; vertical-align: middle; }
.woche li.heute b { color: #1c1209; }
.woche .leise { margin: 8px 2px 0; font-size: 12px; }

/* ---------- Kacheln und Raster ---------- */
.kachel {
  position: relative;
  isolation: isolate;
  background: var(--glas-licht), var(--glas);
  backdrop-filter: blur(26px) saturate(1.7);
  -webkit-backdrop-filter: blur(26px) saturate(1.7);
  border: 1px solid transparent;
  border-radius: var(--r);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.22),
    inset 0 -1px 0 rgba(255, 255, 255, 0.05),
    0 30px 60px -36px rgba(0, 0, 0, 0.7);
}
/* Lichtkante: Verlaufsrand, hell oben links und unten rechts wie bei gebogenem Glas */
.kachel::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: var(--rand-licht);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  z-index: -1;
}

/* Symbol in einer Glasblase (Kachelkoepfe, Kennzahlen) */
.blase {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  flex: none;
  color: #f4e3cf;
  background: radial-gradient(120% 120% at 30% 20%, rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0.06) 60%), rgba(176, 124, 80, 0.28);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4), inset 0 0 0 1px rgba(255, 255, 255, 0.14), 0 6px 14px -8px rgba(0, 0, 0, 0.6);
}
.blase .ic { width: 18px; height: 18px; }
.blase-klein { width: 30px; height: 30px; color: var(--moos); background: radial-gradient(120% 120% at 30% 20%, rgba(255, 255, 255, 0.26), rgba(255, 255, 255, 0.05) 60%), rgba(127, 168, 137, 0.16); }
.blase-klein .ic { width: 16px; height: 16px; }
.zahl-kopf { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
h3 .ic { width: 15px; height: 15px; margin: -2px 6px 0 0; vertical-align: middle; color: var(--rinde-hell); }
.filter button .ic { width: 15px; height: 15px; }
.raster {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 16px;
  align-items: start;
}
.fokus { grid-column: span 7; padding: 22px 24px 18px; }
.zahlen { grid-column: span 5; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.post { grid-column: 1 / -1; padding: 22px 24px; }
.aufgaben { grid-column: 1 / -1; padding: 22px 24px; }
.projekte, .sitzungen { grid-column: 1 / -1; padding: 22px 24px; }

.kachel-kopf { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 14px; flex-wrap: wrap; }
h2 { font-size: 16px; font-weight: 600; margin: 0; letter-spacing: -0.005em; display: flex; align-items: center; gap: 11px; }
h3 { font-size: 13px; font-weight: 500; color: var(--text-2); margin: 0 0 10px; letter-spacing: 0.01em; }
.leise { color: var(--text-3); font-size: 13px; margin: 2px 0 0; }
.leer { color: var(--text-2); font-size: 13.5px; margin: 6px 0 12px; }
.gross { font-family: var(--mono); font-size: 40px; font-weight: 500; letter-spacing: -0.03em; line-height: 1.05; margin: 6px 0 4px; font-variant-numeric: tabular-nums; }
.gross small { font-size: 15px; color: var(--text-3); letter-spacing: 0; }

.zahl { padding: 18px 20px; min-height: 148px; display: flex; flex-direction: column; transition: transform 0.25s var(--kurve), background-color 0.25s; }
.zahl:hover { background: var(--glas-licht), var(--glas-hoch); transform: translateY(-2px); }
.zahl h3 { margin: 0; }
.zahl .leise { margin-top: auto; }

.hinweis {
  display: flex; gap: 8px; align-items: flex-start;
  margin: 0 0 12px; padding: 9px 12px;
  font-size: 13px; color: #f1d2ab;
  background: rgba(224, 161, 90, 0.1);
  border: 1px solid rgba(224, 161, 90, 0.28);
  border-radius: var(--r-klein);
}
.hinweis .ic { width: 16px; height: 16px; margin-top: 2px; color: var(--warn); }

/* Umschalter und Filter */
.schalter, .filter { display: flex; gap: 4px; padding: 4px; border-radius: 999px; background: rgba(0, 0, 0, 0.24); box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.25); border: 1px solid var(--linie); flex-wrap: wrap; }
.schalter button, .filter button {
  font: inherit; font-size: 13px; color: var(--text-2);
  background: transparent; border: 0; border-radius: 999px;
  padding: 6px 12px; cursor: pointer;
  display: inline-flex; align-items: center; gap: 7px;
  transition: background-color 0.2s, color 0.2s, transform 0.15s var(--kurve);
}
.schalter button:hover, .filter button:hover { color: var(--text); }
.schalter button[aria-selected="true"], .filter button[aria-pressed="true"] { background: linear-gradient(180deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.06)), rgba(176, 124, 80, 0.3); color: #fbe9d6; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 4px 10px -6px rgba(0, 0, 0, 0.6); }
.schalter button:active, .filter button:active { transform: scale(0.97); }
.filter button span { font-family: var(--mono); font-size: 11.5px; color: var(--text-3); }
.schalter button:focus-visible, .filter button:focus-visible, .mehr:focus-visible, summary:focus-visible { outline: 2px solid var(--rinde-hell); outline-offset: 2px; }

/* ---------- Fokus der Woche (Balken) ---------- */
.balken { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 10px; height: 200px; margin-top: 10px; align-items: end; }
.tag { display: grid; grid-template-rows: 18px 1fr 20px; height: 100%; justify-items: center; outline: none; }
.tag .wert { font-family: var(--mono); font-size: 12px; color: var(--text-2); }
.tag .wt { font-size: 12px; color: var(--text-3); align-self: end; }
.tag.heute .wt { color: var(--rinde-hell); font-weight: 600; }
.saeule {
  width: min(44px, 100%); height: 100%;
  display: flex; flex-direction: column-reverse; gap: 2px;
  border-radius: 999px;
  overflow: hidden;
  background: repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.035) 0 1px, transparent 1px 25%);
}
.tag.heute .saeule { box-shadow: inset 0 0 0 1px rgba(207, 157, 112, 0.4); }
.seg { display: block; width: 100%; min-height: 3px; }
.saeule .seg:last-child { border-radius: 4px 4px 0 0; }
.seg-wi { background: var(--d-wi); }
.seg-hwb { background: var(--d-hwb); }
.seg-privat { background: var(--d-privat); }
.seg-system { background: repeating-linear-gradient(135deg, var(--d-system) 0 3px, #48504a 3px 6px); }
.tag[data-tip]::after { left: 50%; top: auto; bottom: calc(100% + 4px); transform: translate(-50%, 4px); }
.tag[data-tip]:hover::after, .tag[data-tip]:focus-visible::after { transform: translate(-50%, 0); }
.tag:first-child[data-tip]::after { left: 0; transform: translate(0, 4px); }
.tag:first-child[data-tip]:hover::after, .tag:first-child[data-tip]:focus-visible::after { transform: translate(0, 0); }
.tag:last-child[data-tip]::after { left: auto; right: 0; transform: translate(0, 4px); }
.tag:last-child[data-tip]:hover::after, .tag:last-child[data-tip]:focus-visible::after { transform: translate(0, 0); }
.legende { list-style: none; display: flex; gap: 16px; margin: 14px 0 0; padding: 0; font-size: 12.5px; color: var(--text-2); flex-wrap: wrap; }
.legende li { display: flex; align-items: center; gap: 6px; }
.legende i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }

/* ---------- Kennungen ---------- */
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--mono); font-size: 12px; font-weight: 500;
  padding: 2px 8px 2px 7px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--linie);
  color: var(--text);
  white-space: nowrap;
}
.chip::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--system); flex: none; }
.chip-wi::before, .punkt-wi { background: var(--wi); }
.chip-hwb::before, .punkt-hwb { background: var(--hwb); }
.chip-privat::before, .punkt-privat { background: var(--privat); }
.chip-system::before, .punkt-system { background: var(--system); }
.schalter i { width: 7px; height: 7px; border-radius: 50%; display: inline-block; }

/* ---------- Post ---------- */
.reiter-inhalt { animation: einblenden 0.35s var(--kurve); }
.skelett { list-style: none; margin: 6px 0 14px; padding: 0; display: grid; gap: 10px; }
.skelett li { height: 44px; border-radius: 12px; background: linear-gradient(90deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.04)); background-size: 200% 100%; animation: schimmer 2.4s linear infinite; }
.skelett li:nth-child(2) { width: 86%; }
.skelett li:nth-child(3) { width: 64%; }
@keyframes schimmer { to { background-position: -200% 0; } }
@keyframes einblenden { from { opacity: 0; filter: blur(4px); } to { opacity: 1; filter: none; } }

.schalter .zaehler { font-family: var(--mono); font-size: 11.5px; color: var(--text-3); }
.schalter button[aria-selected="true"] .zaehler { color: #fbe9d6; }
.schalter button .ic { width: 15px; height: 15px; }

/* Postfaecher als Glaspillen mit Zustand */
.faecher { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 16px; padding: 0; }
.faecher li {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 5px 12px 5px 9px; border-radius: 999px; font-size: 12.5px;
  background: rgba(255, 255, 255, 0.07); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14), inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}
.faecher li .ic { width: 15px; height: 15px; color: var(--nadel); }
.faecher em { font-style: normal; font-family: var(--mono); font-size: 11.5px; color: var(--text-3); }
.faecher li.fehlt .ic, .faecher li.stoerung .ic, .faecher li.fehlt em, .faecher li.stoerung em { color: var(--warn); }

/* Aufgaben aus der Post */
.postliste { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.postliste li {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 14px; align-items: center;
  padding: 11px 14px 11px 11px; border-radius: 16px;
  background: rgba(255, 255, 255, 0.045);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.09);
  transition: opacity 0.3s, transform 0.35s var(--kurve), background-color 0.2s;
}
.postliste li:hover { background: rgba(255, 255, 255, 0.08); }
.postliste li.weg { opacity: 0; transform: translateX(24px); }
.kat {
  display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px;
  color: var(--moos);
  background: radial-gradient(120% 120% at 30% 20%, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0.04) 60%), rgba(127, 168, 137, 0.14);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3);
}
.kat .ic { width: 19px; height: 19px; }
.prio-hoch .kat { color: #fbe2c6; background: radial-gradient(120% 120% at 30% 20%, rgba(255, 255, 255, 0.28), rgba(255, 255, 255, 0.05) 60%), rgba(207, 120, 70, 0.42); }
.prio-niedrig .kat { opacity: 0.7; }
.kat[data-tip]::after { left: 50%; top: auto; bottom: calc(100% + 6px); transform: translate(-50%, 4px); }
.kat[data-tip]:hover::after { transform: translate(-50%, 0); }
.post-text { min-width: 0; display: grid; gap: 2px; }
.post-text b { font-weight: 500; font-size: 14px; line-height: 1.4; }
.post-text small { color: var(--text-3); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.post-rand { display: flex; align-items: center; gap: 12px; }
.post-rand time { font-family: var(--mono); font-size: 12px; color: var(--text-2); white-space: nowrap; }
.frist { display: inline-flex; align-items: center; gap: 4px; font-family: var(--mono); font-size: 12px; color: var(--rinde-hell); }
.frist .ic { width: 13px; height: 13px; }
.post-knoepfe { display: flex; gap: 4px; }
.post-knoepfe button {
  display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%;
  border: 0; cursor: pointer; color: var(--text-2);
  background: rgba(255, 255, 255, 0.07); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16);
  transition: color 0.2s, background-color 0.2s, transform 0.15s var(--kurve);
}
.post-knoepfe button .ic { width: 16px; height: 16px; }
.post-knoepfe button:hover { color: var(--text); background: rgba(255, 255, 255, 0.14); }
.post-knoepfe button[data-aktion="erledigt"]:hover { color: #10241a; background: var(--nadel); }
.post-knoepfe button:active { transform: scale(0.94); }
.post-knoepfe button:focus-visible { outline: 2px solid var(--rinde-hell); outline-offset: 2px; }
.post-knoepfe [data-tip]::after { left: 50%; top: auto; bottom: calc(100% + 6px); transform: translate(-50%, 4px); }
.post-knoepfe [data-tip]:hover::after { transform: translate(-50%, 0); }
.ohne { margin-top: 16px; }
.ohne summary { cursor: pointer; font-size: 13px; color: var(--text-2); display: flex; align-items: center; gap: 8px; list-style: none; }
.ohne summary::-webkit-details-marker { display: none; }
.ohne summary .ic { width: 15px; height: 15px; color: var(--text-3); }
.ohne .liste { margin-top: 8px; }
.post-stand { margin-top: 14px; }

/* ---------- Aufgaben ---------- */
.spalten { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 28px; }
.anz { font-family: var(--mono); color: var(--rinde-hell); margin-left: 4px; }
.liste { list-style: none; margin: 0 0 20px; padding: 0; display: grid; gap: 2px; }
.liste li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: start; padding: 8px 0; border-bottom: 1px solid var(--linie); font-size: 13.5px; }
.liste li:last-child { border-bottom: 0; }
.liste li span:not(.chip) { color: var(--text); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.liste em, .todo summary em { font-style: normal; font-family: var(--mono); font-size: 12px; color: var(--text-3); white-space: nowrap; }
.liste.kompakt li { align-items: center; }
.todo { border-bottom: 1px solid var(--linie); }
.todo summary { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 9px 0; cursor: pointer; list-style: none; font-size: 13.5px; }
.todo summary::-webkit-details-marker { display: none; }
.todo summary span:not(.chip) { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.todo ul { margin: 0 0 10px; padding: 0 0 0 18px; color: var(--text-2); font-size: 13px; display: grid; gap: 5px; }
.todo ul li::marker { color: var(--rinde); }

/* ---------- Projekte ---------- */
.tabelle-huelle { overflow-x: auto; margin: 0 -8px; }
.tabelle { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.tabelle th, .tabelle td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--linie); vertical-align: top; }
.tabelle thead th { font-size: 11.5px; font-weight: 500; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.06em; border-bottom-color: var(--linie-2); }
.tabelle tbody th { font-weight: 400; min-width: 170px; }
.tabelle tbody th small { display: block; color: var(--text-3); font-size: 12px; margin-top: 4px; max-width: 26ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tabelle tbody tr { transition: background-color 0.2s; }
.tabelle tbody tr:hover { background: rgba(255, 255, 255, 0.025); }
.tabelle .z { text-align: right; font-family: var(--mono); font-size: 12.5px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.tabelle .schritt { color: var(--text-2); max-width: 52ch; }
.tabelle .null { color: var(--text-3); opacity: 0.6; }
.tabelle .warn { color: var(--warn); }
.tabelle tr.ruht { opacity: 0.7; }
.tabelle tbody.wechsel { animation: einblenden 0.35s var(--kurve); }
.mehr { margin-top: 14px; font: inherit; font-size: 13px; color: var(--rinde-hell); background: none; border: 0; padding: 4px 0; cursor: pointer; }
.mehr:hover { color: #ecc49d; }

/* ---------- Sitzungen ---------- */
.sitzungsliste { list-style: none; margin: 0; padding: 0; }
.sitzungsliste li {
  display: grid;
  grid-template-columns: 130px 110px minmax(120px, 170px) minmax(0, 1fr) 70px;
  gap: 14px; align-items: center;
  padding: 10px 0; border-bottom: 1px solid var(--linie); font-size: 13.5px;
}
.sitzungsliste li:last-child { border-bottom: 0; }
.sitzungsliste time { font-family: var(--mono); font-size: 12.5px; color: var(--text-2); }
.sitzungsliste .dauer { font-family: var(--mono); font-size: 12.5px; }
.sitzungsliste .dauer small { display: block; color: var(--nadel); font-size: 11px; }
.sitzungsliste .thema { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sitzungsliste .chip { justify-self: start; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.spur { font-style: normal; font-size: 11.5px; color: var(--text-3); text-align: right; }

.fuss { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 28px; font-size: 12.5px; color: var(--text-3); }

/* ---------- Anmeldung ---------- */
.login-seite { display: grid; place-items: center; padding: 24px 16px; }
.login { position: relative; z-index: 1; width: min(400px, 100%); padding: 32px 28px 28px; }
.login-marke { width: 34px; height: 34px; color: var(--rinde-hell); }
.login h1 { font-size: 22px; font-weight: 500; margin: 12px 0 4px; }
.login form { display: grid; gap: 10px; margin-top: 18px; }
.login label { font-size: 13px; color: var(--text-2); }
.login input {
  font: inherit; color: var(--text);
  padding: 11px 13px; border-radius: 12px;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid var(--linie-2);
}
.login input:focus { outline: 2px solid var(--rinde-hell); outline-offset: 1px; }
.knopf {
  font: inherit; font-weight: 500; cursor: pointer;
  padding: 11px 16px; border-radius: 12px; border: 0;
  color: #22160c; background: var(--rinde-hell);
  transition: background-color 0.2s, transform 0.15s var(--kurve);
}
.knopf:hover { background: #dcae84; }
.knopf:active { transform: translateY(1px); }
.ok { color: var(--moos); font-size: 14px; margin: 16px 0 10px; }
.zurueck { font-size: 13px; color: var(--rinde-hell); }

/* ---------- Bewegung reduzieren ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}

/* ---------- Mittlere Breite ---------- */
@media (max-width: 1180px) {
  .fokus, .zahlen, .post, .aufgaben { grid-column: 1 / -1; }
  .zahlen { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* ---------- Handy: Leiste unten, eine Spalte ---------- */
@media (max-width: 767px) {
  body { font-size: 14.5px; }
  .rahmen { grid-template-columns: minmax(0, 1fr); }
  .leiste {
    position: fixed; top: auto; bottom: calc(10px + env(safe-area-inset-bottom)); left: 12px; right: 12px;
    height: auto; margin: 0; flex-direction: row; justify-content: space-around;
    padding: 8px 10px; border-radius: 22px;
  }
  .leiste ul { flex-direction: row; justify-content: space-around; gap: 0; }
  .marke { display: none; }
  [data-tip]::after { display: none; }
  .inhalt { padding: 20px 16px 110px; }
  .blase { width: 30px; height: 30px; }
  .kopf { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .kopf h1 { font-size: 24px; }
  .woche ol { grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
  .raster { gap: 12px; }
  .zahlen { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .zahl { min-height: 128px; padding: 16px; }
  .gross { font-size: 32px; }
  .fokus, .post, .aufgaben, .projekte, .sitzungen { padding: 18px 16px; }
  .balken { height: 170px; gap: 6px; }
  .spalten { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .postliste li { grid-template-columns: auto minmax(0, 1fr); gap: 10px 12px; padding: 10px; }
  .post-rand { grid-column: 2; justify-content: space-between; }
  .post-text small { white-space: normal; }
  .schalter button { padding: 6px 10px; }
  .tag[data-tip]::after { display: none; }

  /* Tabelle als Zeilenblock */
  .tabelle thead { display: none; }
  .tabelle, .tabelle tbody, .tabelle tr { display: block; }
  .tabelle tr { padding: 12px 8px; border-bottom: 1px solid var(--linie); display: grid; grid-template-columns: repeat(4, auto); gap: 6px 12px; }
  .tabelle tr[hidden] { display: none; }
  .tabelle th, .tabelle td { border: 0; padding: 0; }
  .tabelle tbody th { grid-column: 1 / -1; }
  .tabelle td:nth-child(2) { grid-column: 1 / -1; color: var(--text-3); font-size: 12.5px; }
  .tabelle .schritt { grid-column: 1 / -1; max-width: none; }
  .tabelle .z { text-align: left; }
  .tabelle .z::before { color: var(--text-3); font-family: var(--schrift); font-size: 11px; display: block; }
  .tabelle td:nth-child(4)::before { content: "Still"; }
  .tabelle td:nth-child(5)::before { content: "7 Tage"; }
  .tabelle td:nth-child(6)::before { content: "30 Tage"; }
  .tabelle td:nth-child(7)::before { content: "Gesamt"; }

  .sitzungsliste li { grid-template-columns: minmax(0, 1fr) auto; gap: 4px 10px; }
  .sitzungsliste time { grid-column: 1; }
  .sitzungsliste .dauer { grid-column: 2; text-align: right; }
  .sitzungsliste .chip { grid-column: 1; }
  .sitzungsliste .spur { grid-column: 2; }
  .sitzungsliste .thema { grid-column: 1 / -1; white-space: normal; }
}
