:root {
  --bg: #f5f6f8; --card: #ffffff; --text: #1d2330; --muted: #667085; --line: #e3e6ec;
  --accent: #b4234a; --accent-text: #ffffff; --accent-soft: #fbe9ee; --danger: #b42318;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #14171d; --card: #1d222b; --text: #e8eaf0; --muted: #98a2b3; --line: #2c333f;
          --accent: #f0708f; --accent-text: #1a0a10; --accent-soft: #3a1f28; --danger: #f97066; }
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--bg); color: var(--text);
       font: 16px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
main { max-width: 640px; margin: 0 auto; padding: 12px 16px 96px; }
h1 { font-size: 1.15rem; margin: 0; text-align: center; flex: 1; }
h2 { font-size: 1rem; margin: 0 0 10px; }
a { color: var(--accent); }
.muted { color: var(--muted); } .small { font-size: .85rem; } .error { color: var(--danger); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 14px; margin-bottom: 14px; }
label { display: flex; flex-direction: column; gap: 4px; font-size: .9rem; color: var(--muted); min-width: 0; }
input, textarea, button { font: inherit; }
input, textarea { width: 100%; padding: 10px; border: 1px solid var(--line); border-radius: 10px;
                  background: var(--bg); color: var(--text); }
textarea { resize: vertical; }
button, .btn { display: inline-block; padding: 10px 14px; border: 0; border-radius: 10px; background: var(--accent);
               color: var(--accent-text); font-weight: 600; text-decoration: none; cursor: pointer; }
.btn.ghost { background: transparent; color: var(--accent); border: 1px solid var(--line); }
.btn.danger { background: transparent; color: var(--danger); border: 1px solid var(--line); width: 100%; }
button.gross { padding: 12px 18px; font-size: 1.05rem; }
.login { max-width: 380px; margin: 15vh auto 0; display: flex; flex-direction: column; gap: 12px; }
.login form { display: flex; flex-direction: column; gap: 12px; }

.daybar { display: flex; align-items: center; gap: 8px; margin: 4px 0 12px; }
.nav-btn { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 12px; font-size: 1.6rem;
           text-decoration: none; background: var(--card); border: 1px solid var(--line); flex: none; }
.nav-btn.off { visibility: hidden; }

.erfassen { display: flex; flex-direction: column; gap: 10px; }
.mic { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 18px; border-radius: 16px;
       font-size: 1.05rem; background: var(--accent); }
.mic-icon { font-size: 1.8rem; }
.mic.an { animation: puls 1.2s ease-in-out infinite; }
@keyframes puls { 0%, 100% { box-shadow: 0 0 0 0 rgba(180, 35, 74, .45); } 50% { box-shadow: 0 0 0 12px rgba(180, 35, 74, 0); } }
.row { display: flex; gap: 10px; align-items: flex-end; }
.row > label { flex: 1; }
.row .zeit { flex: 0 0 auto; width: 130px; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips:empty { display: none; }
.chip { font-size: .8rem; padding: 2px 8px; border-radius: 999px; background: var(--accent-soft); color: var(--text); }

.knoepfe { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-bottom: 14px; }
.knopf { background: var(--card); color: var(--text); border: 1px solid var(--line); padding: 12px 10px;
         font-weight: 500; text-align: left; border-radius: 12px; }
.knopf:active { background: var(--accent-soft); }
.knopf:disabled { opacity: .5; }

.liste { list-style: none; margin: 0; padding: 0; }
.liste li { border-top: 1px solid var(--line); }
.liste li:first-child { border-top: 0; }
.liste a { display: flex; gap: 12px; padding: 10px 0; color: inherit; text-decoration: none; }
.uhr { font-variant-numeric: tabular-nums; font-weight: 700; color: var(--accent); flex: none; width: 3.2em; }
.inhalt { display: flex; flex-direction: column; gap: 4px; min-width: 0; overflow-wrap: anywhere; }

.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.stats div { display: flex; flex-direction: column; }
.stats strong { font-size: 1.3rem; }
.stats span { font-size: .78rem; color: var(--muted); }

.tabs { display: flex; gap: 6px; margin-bottom: 12px; }
.tabs a { padding: 6px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--card);
          text-decoration: none; font-weight: 600; font-size: .9rem; }
.tabs a.active { background: var(--accent); color: var(--accent-text); border-color: var(--accent); }
.table-wrap { overflow-x: auto; padding: 6px 8px; }
table.woche { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.woche th, .woche td { padding: 7px 4px; border-bottom: 1px solid var(--line); text-align: center; white-space: nowrap; }
.woche th:first-child, .woche td:first-child { text-align: left; }
.woche tr.leer td { color: var(--muted); }

.bottom { position: fixed; left: 0; right: 0; bottom: 0; display: flex; justify-content: center; gap: 40px;
          background: var(--card); border-top: 1px solid var(--line); padding: 6px 0 calc(6px + env(safe-area-inset-bottom)); }
.bottom a { display: flex; flex-direction: column; align-items: center; font-size: 1.3rem; text-decoration: none;
            color: var(--muted); min-width: 72px; }
.bottom a span { font-size: .75rem; }
.bottom a.active { color: var(--accent); }

.toast { position: fixed; left: 16px; right: 16px; bottom: calc(76px + env(safe-area-inset-bottom)); max-width: 608px;
         margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 12px;
         background: var(--text); color: var(--bg); padding: 12px 14px; border-radius: 12px; z-index: 10; }
.toast button { background: transparent; color: var(--bg); border: 1px solid currentColor; padding: 6px 10px; }
