@font-face { font-family: "Geist"; src: url("/fonts/Geist-Variable.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Geist Mono"; src: url("/fonts/GeistMono-Variable.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }

:root {
  --bg: #f4f4f6; --panel: #ffffff; --text: #16161a; --muted: #6b6b73; --faint: #a1a1aa; --line: #e4e4e9;
  --accent: #2563eb; --accent-text: #ffffff; --amber: #b45309; --amber-bg: rgba(217, 119, 6, 0.09);
  --dock: rgba(255, 255, 255, 0.8); --dock-aktiv: #16161a; --dock-aktiv-text: #ffffff; --schatten: 0 1px 2px rgba(0, 0, 0, 0.04);
  --pixkom: #6e5fd6; --eve: #db4f86; --privat: #14998e; --brixkom: #e0a021; --lexkom: #64748b; --produkte: #3b82f6; --mastermind: #a16207; --ohne: #a1a1aa;
  --glow: 0;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b0c0f; --panel: #15161b; --text: #f2f2f4; --muted: #8a8a93; --faint: #5c5c66; --line: #24252c;
    --accent: #4f8bff; --accent-text: #ffffff; --amber: #f59e0b; --amber-bg: rgba(245, 158, 11, 0.1);
    --dock: rgba(30, 31, 38, 0.82); --dock-aktiv: #f2f2f4; --dock-aktiv-text: #0b0c0f; --schatten: none;
    --pixkom: #8b7dff; --eve: #f472b6; --privat: #2dd4bf; --brixkom: #fbbf24;
    --glow: 1;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0b0c0f; --panel: #15161b; --text: #f2f2f4; --muted: #8a8a93; --faint: #5c5c66; --line: #24252c;
  --accent: #4f8bff; --accent-text: #ffffff; --amber: #f59e0b; --amber-bg: rgba(245, 158, 11, 0.1);
  --dock: rgba(30, 31, 38, 0.82); --dock-aktiv: #f2f2f4; --dock-aktiv-text: #0b0c0f; --schatten: none;
  --pixkom: #8b7dff; --eve: #f472b6; --privat: #2dd4bf; --brixkom: #fbbf24;
  --glow: 1;
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
body {
  font: 16px/1.4 "Geist", -apple-system, BlinkMacSystemFont, sans-serif;
  padding: env(safe-area-inset-top) 16px calc(110px + env(safe-area-inset-bottom));
  -webkit-tap-highlight-color: transparent;
  -webkit-font-smoothing: antialiased;
}
main { max-width: 640px; margin: 0 auto; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
.mono { font-family: "Geist Mono", ui-monospace, monospace; font-variant-numeric: tabular-nums; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.leise { color: var(--muted); }
.label { font-size: 10px; font-weight: 500; letter-spacing: 0.24em; color: var(--muted); }

/* Login */
.login { padding-top: 22vh; display: grid; gap: 6px; }
.login h1 { margin: 0; font-size: 40px; font-weight: 300; letter-spacing: -0.03em; }
.login p { margin: 0 0 24px; }
.login form { display: grid; gap: 10px; }
input[type="password"], input[type="text"], input[type="date"] {
  min-height: 52px; padding: 0 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); width: 100%; outline: none;
}
input:focus-visible { border-color: var(--accent); }
.primaer { min-height: 52px; padding: 0 20px; border: 0; border-radius: 26px; background: var(--accent); color: var(--accent-text); font-weight: 600; }
.primaer.gross { min-height: 58px; font-size: 17px; }

/* Kopf */
.kopf { padding: 22px 6px 18px; }
.kopf-zeile { display: flex; justify-content: space-between; font-size: 11px; font-weight: 500; letter-spacing: 0.22em; color: var(--muted); }
.titel-zeile { display: flex; justify-content: space-between; align-items: baseline; margin-top: 10px; }
.titel-zeile h1 { margin: 0; font-size: 34px; font-weight: 500; letter-spacing: -0.03em; }
#summe { font-size: 14px; color: var(--muted); }

/* Blöcke */
.block { margin-bottom: 22px; }
.block-kopf { display: flex; justify-content: space-between; align-items: baseline; margin: 0 6px 8px; }
.block-kopf .mono { font-size: 12px; color: var(--muted); }
.liste { display: grid; gap: 8px; }
.leer { color: var(--muted); padding: 4px 6px 12px; margin: 0; }

/* Liegengeblieben */
.liegt { display: flex; align-items: center; gap: 12px; padding: 12px 12px 12px 16px; border-radius: 16px; background: var(--amber-bg); }
.liegt .punkt { width: 6px; height: 6px; border-radius: 3px; background: var(--amber); box-shadow: 0 0 0 4px color-mix(in srgb, var(--amber) 18%, transparent); flex-shrink: 0; }
.liegt .was { flex-grow: 1; font-size: 15px; }
.liegt .seit { color: var(--amber); font-size: 13px; }
.liegt button { min-height: 36px; padding: 0 12px; border: 0; border-radius: 18px; background: none; color: var(--accent); font-weight: 600; }

/* Aufgabe */
.karte {
  --farbe: var(--ohne);
  border-radius: 16px; background: var(--panel);
  box-shadow: var(--schatten);
  position: relative; overflow: hidden;
}
.karte::before {
  content: ""; position: absolute; left: 0; top: 16px; height: 20px; width: 3px; border-radius: 0 2px 2px 0;
  background: var(--farbe); box-shadow: 0 0 calc(12px * var(--glow)) var(--farbe);
}
.erledigt::before { opacity: 0.35; }
.kompakt .text { padding: 11px 14px 11px 0; gap: 1px; }
.kompakt .text .titel { font-size: 15px; }
.kompakt .haken { height: 44px; }
.kompakt::before { top: 12px; height: 18px; }
.zeile { display: grid; grid-template-columns: 48px 1fr; align-items: start; }
.haken { width: 48px; height: 52px; border: 0; background: none; display: grid; place-items: center; padding: 0 0 0 4px; }
.haken::before { content: ""; width: 22px; height: 22px; border-radius: 11px; border: 1.5px solid var(--faint); transition: background .15s, border-color .15s; }
.haken:hover::before { border-color: var(--accent); }
.erledigt .haken::before { background: var(--accent); border-color: var(--accent); box-shadow: inset 0 0 0 4px var(--panel); }
.text { padding: 14px 16px 14px 0; border: 0; background: none; text-align: left; width: 100%; display: grid; gap: 3px; }
.text .titel { font-size: 16px; font-weight: 500; }
.text .meta { font-size: 13px; color: var(--muted); }
.text .frist { color: var(--amber); }
.erledigt .titel { color: var(--faint); text-decoration: line-through; }
.erledigt .meta { color: var(--faint); }
.details { display: none; padding: 0 16px 14px 48px; }
.offen .details { display: block; }
.details .label { display: block; margin-top: 4px; }
.details .detail { font-size: 14px; line-height: 1.5; color: var(--text); margin: 4px 0 10px; opacity: 0.85; }
.details .detail.unter { margin: -6px 0 6px; padding-left: 12px; color: var(--muted); }
.details .aktionen { margin-top: 6px; }
.aktionen { display: flex; flex-wrap: wrap; gap: 8px; }
.aktionen button, .aktionen input[type="date"] {
  min-height: 38px; padding: 0 14px; border-radius: 19px; border: 1px solid var(--line); background: none; width: auto; font-size: 14px;
}
.aktionen .gefahr { color: #dc2626; }
.mehr { margin: 2px 6px 0; padding: 8px 0; border: 0; background: none; color: var(--muted); font-size: 13px; }

/* Woche */
.verteilung { margin: 0 6px 22px; display: grid; gap: 10px; }
.balken { display: flex; height: 6px; gap: 3px; }
.balken span { border-radius: 3px; min-width: 6px; }
.legende { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 12px; color: var(--muted); }
.legende b { color: var(--text); font-weight: 600; }
.tag-kopf { display: flex; justify-content: space-between; align-items: baseline; margin: 0 6px 8px; font-size: 11px; font-weight: 500; letter-spacing: 0.18em; color: var(--muted); }
.tag-kopf.heute { color: var(--accent); }
.tag-kopf .voll { color: var(--amber); }

/* Dock */
.dock {
  position: fixed; left: 50%; bottom: calc(22px + env(safe-area-inset-bottom)); transform: translateX(-50%);
  display: flex; align-items: center; gap: 6px; padding: 6px; border-radius: 28px; background: var(--dock);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 10px 30px rgba(10, 10, 20, 0.16), inset 0 0 0 1px color-mix(in srgb, var(--text) 8%, transparent);
  z-index: 10;
}
.dock button { min-height: 44px; padding: 0 18px; border: 0; border-radius: 22px; background: none; color: var(--muted); font-size: 14px; }
.dock button[aria-pressed="true"] { background: var(--dock-aktiv); color: var(--dock-aktiv-text); font-weight: 500; }
.dock .plus { width: 44px; padding: 0; display: grid; place-items: center; background: var(--accent); color: var(--accent-text); }

/* Sheet */
.sheet-grund { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.35); z-index: 20; }
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; max-width: 640px; margin: 0 auto; z-index: 21;
  background: var(--bg); border-radius: 22px 22px 0 0; padding: 8px 16px calc(20px + env(safe-area-inset-bottom));
  display: grid; gap: 16px; box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.2);
}
.griff { width: 36px; height: 5px; border-radius: 3px; background: var(--line); justify-self: center; }
.sheet-kopf { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; }
.text-knopf { justify-self: start; min-height: 44px; padding: 0; border: 0; background: none; color: var(--accent); }
#neu-text { font-size: 19px; min-height: 58px; }
.feld { display: grid; gap: 8px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips button { min-height: 40px; padding: 0 14px; border-radius: 20px; border: 1px solid var(--line); background: var(--panel); font-size: 14px; display: inline-flex; align-items: center; gap: 8px; }
.chips button[aria-pressed="true"] { border-color: var(--accent); color: var(--accent); font-weight: 600; }
.chips .led { width: 8px; height: 8px; border-radius: 4px; }

#meldung {
  position: fixed; left: 16px; right: 16px; bottom: calc(92px + env(safe-area-inset-bottom)); max-width: 420px; margin: 0 auto;
  background: var(--text); color: var(--bg); padding: 12px 16px; border-radius: 14px; font-size: 15px; z-index: 30; text-align: center;
}
