/* ==========================================================================
   MARKETUN · HINTERHÖLLER – Oberfläche (mobil zuerst)
   Basis ist das Corporate Design der Website: Cream-Grund, Ink-Schrift, Haarlinien,
   Newsreader für Überschriften, Archivo für Texte, Barlow Condensed für die Wortmarke.
   Keine Schatten, keine Verläufe, kaum Rundungen – die Zurückhaltung ist das Design.
   ========================================================================== */

@font-face { font-family: 'Archivo'; font-weight: 400; font-display: swap; src: url('fonts/archivo-400.woff2') format('woff2'); }
@font-face { font-family: 'Archivo'; font-weight: 500; font-display: swap; src: url('fonts/archivo-500.woff2') format('woff2'); }
@font-face { font-family: 'Archivo'; font-weight: 600; font-display: swap; src: url('fonts/archivo-600.woff2') format('woff2'); }
@font-face { font-family: 'Archivo'; font-weight: 700; font-display: swap; src: url('fonts/archivo-700.woff2') format('woff2'); }
@font-face { font-family: 'Newsreader'; font-weight: 400; font-display: swap; src: url('fonts/newsreader-400.woff2') format('woff2'); }
@font-face { font-family: 'Newsreader'; font-weight: 500; font-display: swap; src: url('fonts/newsreader-500.woff2') format('woff2'); }
@font-face { font-family: 'Newsreader'; font-style: italic; font-weight: 400; font-display: swap; src: url('fonts/newsreader-400italic.woff2') format('woff2'); }
@font-face { font-family: 'Newsreader'; font-style: italic; font-weight: 500; font-display: swap; src: url('fonts/newsreader-500italic.woff2') format('woff2'); }
@font-face { font-family: 'Barlow Condensed'; font-weight: 800; font-display: swap; src: url('fonts/barlowcondensed-800.woff2') format('woff2'); }

:root {
  --ink: #181614;
  --cream: #FAF7F2;
  --paper: #FFFDF9;
  --paper-2: #F3EEE6;
  --text: #4a453f;
  --muted: #6a6459;
  --subtle: #8a8074;
  --rule: #DAD3C6;
  --rule-2: #E8E2D7;
  --accent: #B5654A;
  --accent-bg: #F5E6DF;
  --red: #9E3B2F;    --red-bg: #F4E3DE;
  --amber: #946516;  --amber-bg: #F4EAD6;
  --green: #3F6B4A;  --green-bg: #E3EBE2;
  --blue: #3A5A78;   --blue-bg: #E1E7EE;
  --violet: #6B5A86; --violet-bg: #EAE5EF;
  --serif: 'Newsreader', Georgia, 'Times New Roman', serif;
  --sans: 'Archivo', Helvetica, Arial, sans-serif;
  --cond: 'Barlow Condensed', 'Arial Narrow', sans-serif;
  --radius: 2px;
  --nav-h: 62px;
  --side-w: 256px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--cream); color: var(--ink);
  font: 15px/1.55 var(--sans);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--subtle); }
h1, h2, h3 { margin: 0; font-family: var(--serif); font-weight: 500; line-height: 1.25; color: var(--ink); }
h1 { font-size: 1.75rem; letter-spacing: -.005em; }
h2 { font-size: 1.28rem; }
h3 { font-size: 1.08rem; }
p { color: var(--text); }
strong { font-weight: 600; }
.muted { color: var(--muted); }
.subtle { color: var(--subtle); }
.small { font-size: .86rem; }
.center { text-align: center; }
.hidden { display: none !important; }
.serif { font-family: var(--serif); }
.i { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; flex: none; vertical-align: middle; }
.i-sm { width: 16px; height: 16px; }
.i-lg { width: 24px; height: 24px; }
.loading { min-height: 90vh; display: grid; place-items: center; opacity: .5; }
.kicker { font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--subtle); }
.wordmark { font-family: var(--cond); font-weight: 800; letter-spacing: .01em; text-transform: uppercase; line-height: 1; }

/* ---------- Grundlayout ---------- */
.shell { min-height: 100vh; }
.topbar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: calc(var(--safe-t) + 10px) 16px 10px;
  background: var(--cream); border-bottom: 1px solid var(--rule);
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); }
.brand:hover { color: var(--ink); }
.brand-signet { width: 26px; height: 24px; }
.brand .wordmark { font-size: 1.28rem; display: block; }
.brand small { display: block; font-family: var(--cond); font-weight: 800; font-size: .7rem; letter-spacing: .2em; color: var(--subtle); margin-top: 2px; }
.top-actions { display: flex; align-items: center; gap: 2px; }
.icon-btn {
  position: relative; width: 42px; height: 42px; display: grid; place-items: center;
  border: 0; background: none; color: var(--ink); cursor: pointer; border-radius: var(--radius);
}
.icon-btn:hover { background: var(--paper-2); color: var(--ink); }
.avatar {
  display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%;
  background: var(--ink); color: var(--cream); font-size: .74rem; font-weight: 600; letter-spacing: .04em; flex: none;
}
.avatar.sm { width: 26px; height: 26px; font-size: .64rem; }
.avatar.light { background: var(--paper-2); color: var(--ink); border: 1px solid var(--rule); }
.avatars { display: inline-flex; }
.avatars .avatar { border: 2px solid var(--cream); margin-left: -6px; }
.avatars .avatar:first-child { margin-left: 0; }
.nav-badge {
  position: absolute; top: 4px; right: 3px; min-width: 17px; height: 17px; padding: 0 5px;
  border-radius: 9px; background: var(--accent); color: #fff; font-size: .66rem; font-weight: 700;
  display: grid; place-items: center; line-height: 1;
}
.view { padding: 22px 16px calc(var(--nav-h) + var(--safe-b) + 28px); max-width: 980px; margin: 0 auto; min-width: 0; }
.home-grid > *, .space-head > *, .row > * { min-width: 0; }
.sidenav { display: none; }
.bottomnav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  display: grid; grid-template-columns: repeat(5, 1fr);
  height: calc(var(--nav-h) + var(--safe-b)); padding-bottom: var(--safe-b);
  background: var(--cream); border-top: 1px solid var(--rule);
}
.bottomnav a {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  font-size: .64rem; letter-spacing: .06em; text-transform: uppercase; color: var(--subtle);
}
.bottomnav a.active { color: var(--ink); }
.bottomnav a.active::before { content: ''; position: absolute; top: -1px; left: 28%; right: 28%; height: 2px; background: var(--ink); }
.bottomnav .nav-badge { top: 6px; right: calc(50% - 22px); }
.bottomnav .new .plus {
  width: 44px; height: 44px; display: grid; place-items: center; background: var(--ink); color: var(--cream); border-radius: 50%;
}
.bottomnav .new .i { stroke-width: 1.8; }

@media (min-width: 900px) {
  .shell { display: grid; grid-template-columns: var(--side-w) minmax(0, 1fr); grid-template-rows: auto 1fr; }
  .topbar { grid-column: 1 / -1; padding: 14px 28px; }
  .menu-btn { display: none; }
  .sidenav {
    display: flex; flex-direction: column; gap: 1px; position: sticky; top: 67px; align-self: start;
    height: calc(100vh - 67px); overflow-y: auto; padding: 22px 16px 24px 20px; border-right: 1px solid var(--rule);
  }
  .sidenav a.nav {
    position: relative; display: flex; align-items: center; gap: 12px; padding: 9px 10px; color: var(--text);
    font-size: .8rem; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; border-radius: var(--radius);
  }
  .sidenav a.nav:hover { background: var(--paper-2); color: var(--ink); }
  .sidenav a.nav.active { color: var(--ink); background: var(--paper-2); }
  .sidenav a.nav.active::before { content: ''; position: absolute; left: -20px; top: 8px; bottom: 8px; width: 2px; background: var(--ink); }
  .sidenav .nav-badge { position: static; margin-left: auto; }
  .side-new { margin-bottom: 16px; }
  .side-head { margin: 22px 10px 6px; font-size: .68rem; letter-spacing: .14em; text-transform: uppercase; color: var(--subtle); display: flex; justify-content: space-between; }
  .side-space { display: flex; align-items: center; gap: 10px; padding: 6px 10px; font-size: .9rem; color: var(--text); border-radius: var(--radius); }
  .side-space:hover, .side-space.active { background: var(--paper-2); color: var(--ink); }
  .side-space .n { margin-left: auto; font-size: .72rem; color: var(--subtle); }
  .side-foot { margin-top: auto; padding: 18px 10px 0; font-size: .72rem; color: var(--subtle); }
  .bottomnav { display: none; }
  .view { padding: 34px 40px 60px; margin: 0; max-width: 1100px; width: 100%; }
}

/* ---------- Seitenköpfe & Abschnitte ---------- */
.hello { margin: 4px 0 26px; }
.hello h1 { font-size: 2.1rem; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin: 0 0 18px; flex-wrap: wrap; }
.page-head .kicker { margin-bottom: 4px; }
.back { display: inline-flex; align-items: center; gap: 4px; margin: -6px 0 14px; font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; color: var(--subtle); }
.back .i { width: 16px; height: 16px; }
.section { margin-top: 32px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 0 0 12px; padding-bottom: 8px; border-bottom: 1px solid var(--ink); }
.section-head h2 { font-size: 1.2rem; }
.section-head a, .section-head .link { font-size: .74rem; letter-spacing: .1em; text-transform: uppercase; color: var(--subtle); }
.sub-head { font-family: var(--sans); font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; font-weight: 500; color: var(--subtle); margin: 18px 0 8px; }
.desc { white-space: pre-wrap; color: var(--text); margin: 8px 0; }

/* ---------- Karten, Listen ---------- */
.card { background: var(--paper); border: 1px solid var(--rule); border-radius: var(--radius); padding: 18px; margin-bottom: 12px; }
.card > h2:first-child, .card > h3:first-child { margin-bottom: 8px; }
.empty { text-align: center; color: var(--muted); padding: 28px 18px; font-family: var(--serif); font-style: italic; font-size: 1.05rem; }
.empty h1 { font-style: normal; }
.list-plain { list-style: none; margin: 0; padding: 0; }
.list-plain li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--rule-2); }
.list-plain li:last-child { border-bottom: 0; }
.list-plain .sub, .files .sub { font-size: .82rem; color: var(--muted); }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 12px; }
@media (max-width: 560px) { .grid-3 { grid-template-columns: 1fr 1fr; } }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 0 18px;
  border: 1px solid var(--ink); border-radius: var(--radius); background: transparent; color: var(--ink);
  font-size: .76rem; font-weight: 500; letter-spacing: .09em; text-transform: uppercase; cursor: pointer;
  text-decoration: none; white-space: nowrap; transition: background .15s, color .15s;
}
.btn:hover { background: var(--ink); color: var(--cream); }
.btn:disabled { opacity: .45; cursor: default; }
.btn .i { width: 17px; height: 17px; }
.btn-primary { background: var(--ink); color: var(--cream); }
.btn-primary:hover { background: #33302c; color: var(--cream); }
.btn-secondary { border-color: var(--rule); background: var(--paper); }
.btn-secondary:hover { border-color: var(--ink); background: var(--paper); color: var(--ink); }
.btn-ghost { border-color: transparent; background: transparent; color: var(--muted); }
.btn-ghost:hover { background: var(--paper-2); color: var(--ink); }
.btn-accent { background: var(--ink); color: var(--cream); }
.btn-accent:hover { background: #33302c; color: var(--cream); }
.btn-green { background: var(--green); border-color: var(--green); color: #fff; }
.btn-green:hover { background: #33573c; color: #fff; }
.btn-danger { border-color: var(--red); color: var(--red); background: transparent; }
.btn-danger:hover { background: var(--red); color: #fff; }
.btn-sm { min-height: 34px; padding: 0 12px; font-size: .7rem; }
.btn-lg { min-height: 50px; font-size: .8rem; }
.btn-block { display: flex; width: 100%; }
.btn-row { display: flex; flex-wrap: wrap; gap: 8px; }
.btn-row > .btn { flex: 1 1 auto; }
.actions { display: grid; gap: 8px; margin-top: 14px; }
.link-btn { border: 0; background: none; padding: 0; cursor: pointer; color: var(--subtle); font-size: .74rem; letter-spacing: .1em; text-transform: uppercase; }
.link-btn:hover { color: var(--ink); }
.danger-text { color: var(--red) !important; }

/* ---------- Formulare ---------- */
.field { display: block; margin-bottom: 16px; }
.field > span, .field-label { display: block; font-size: .7rem; letter-spacing: .1em; text-transform: uppercase; color: var(--subtle); margin-bottom: 6px; }
.field input:not([type=checkbox]):not([type=radio]):not([type=color]), .field select, .field textarea, .search, .inline-input {
  width: 100%; padding: 10px 0; border: 0; border-bottom: 1px solid var(--rule); border-radius: 0; background: transparent;
  font-size: 1rem; outline: none; transition: border-color .15s;
}
.field input:focus, .field select:focus, .field textarea:focus, .search:focus, .inline-input:focus { border-bottom-color: var(--ink); }
.field textarea { resize: vertical; min-height: 44px; line-height: 1.5; }
.field select {
  appearance: none; -webkit-appearance: none; padding-right: 22px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none' stroke='%23181614' stroke-width='1.4'%3E%3Cpath d='m1 1.5 5 5 5-5'/%3E%3C/svg%3E") no-repeat right 2px center;
}
.field input[type=file] { padding: 8px 0; font-size: .9rem; }
.field small { display: block; margin-top: 4px; }
.search { margin-bottom: 12px; padding-left: 28px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' fill='none' stroke='%238a8074' stroke-width='1.5'%3E%3Ccircle cx='8' cy='8' r='5.5'/%3E%3Cpath d='m12 12 4.5 4.5'/%3E%3C/svg%3E") no-repeat 0 center; }
.check { display: flex; align-items: flex-start; gap: 10px; padding: 7px 0; cursor: pointer; color: var(--text); }
.check input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--ink); flex: none; }
.form-error { background: var(--red-bg); color: var(--red); padding: 10px 12px; border-left: 2px solid var(--red); margin-bottom: 14px; font-size: .92rem; }
.seg { display: flex; flex-wrap: wrap; gap: 6px; }
.seg label { position: relative; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span {
  display: inline-block; padding: 8px 14px; border: 1px solid var(--rule); border-radius: var(--radius); cursor: pointer;
  font-size: .86rem; background: var(--paper); color: var(--text);
}
.seg input:checked + span { background: var(--ink); color: var(--cream); border-color: var(--ink); }
.seg input:focus-visible + span { outline: 2px solid var(--accent); }
.color-pick { display: flex; flex-wrap: wrap; gap: 8px; }
.color-pick label { position: relative; }
.color-pick input { position: absolute; opacity: 0; }
.color-pick span { display: block; width: 30px; height: 30px; border-radius: 50%; cursor: pointer; border: 2px solid var(--cream); outline: 1px solid var(--rule); }
.color-pick input:checked + span { outline: 2px solid var(--ink); }

/* ---------- Chips, Hinweise ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 20px; border: 1px solid var(--rule);
  background: var(--paper); font-size: .76rem; color: var(--text); line-height: 1.6; white-space: nowrap;
}
button.chip, label.chip { cursor: pointer; }
button.chip:hover { border-color: var(--ink); }
.chip input { margin: 0; accent-color: var(--ink); }
.chip .i { width: 13px; height: 13px; }
.chip-red { background: var(--red-bg); border-color: transparent; color: var(--red); }
.chip-amber { background: var(--amber-bg); border-color: transparent; color: var(--amber); }
.chip-green { background: var(--green-bg); border-color: transparent; color: var(--green); }
.chip-blue { background: var(--blue-bg); border-color: transparent; color: var(--blue); }
.chip-violet { background: var(--violet-bg); border-color: transparent; color: var(--violet); }
.chip-ink { background: var(--ink); border-color: var(--ink); color: var(--cream); }
.prio-dringend { background: var(--red); border-color: var(--red); color: #fff; }
.prio-hoch { background: var(--red-bg); border-color: transparent; color: var(--red); }
.prio-niedrig { color: var(--subtle); }
.alert { padding: 12px 14px; margin-bottom: 10px; border-left: 2px solid; font-size: .93rem; }
.alert-red { background: var(--red-bg); border-color: var(--red); color: #5d2219; }
.alert-amber { background: var(--amber-bg); border-color: var(--amber); color: #5a3d0c; }
.alert-blue { background: var(--blue-bg); border-color: var(--blue); color: #243a50; }
.alert-green { background: var(--green-bg); border-color: var(--green); color: #28452f; }
.notice { padding: 12px 14px; margin-bottom: 12px; border-left: 2px solid; }
.notice.ok { background: var(--green-bg); border-color: var(--green); }
.notice.err { background: var(--red-bg); border-color: var(--red); }
.cat-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; flex: none; }

/* ---------- Filter, Reiter ---------- */
.tabs { display: flex; gap: 22px; border-bottom: 1px solid var(--rule); margin: 0 0 22px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab { padding: 10px 0; margin-bottom: -1px; border-bottom: 2px solid transparent; font-size: .74rem; letter-spacing: .1em; text-transform: uppercase; color: var(--subtle); white-space: nowrap; display: inline-flex; gap: 6px; align-items: center; }
.tab.on { color: var(--ink); border-bottom-color: var(--ink); }
.tab .n { font-size: .68rem; color: var(--subtle); }
.filters { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; margin-bottom: 12px; scrollbar-width: none; }
.filters::-webkit-scrollbar { display: none; }
.filter {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border: 1px solid var(--rule); border-radius: 20px;
  background: var(--paper); font-size: .82rem; color: var(--text); white-space: nowrap; cursor: pointer;
}
.filter.on { background: var(--ink); border-color: var(--ink); color: var(--cream); }
.filter .n { font-size: .72rem; opacity: .7; }

/* ---------- Kennzahlen ---------- */
.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0; border-top: 1px solid var(--ink); margin-bottom: 12px; }
@media (min-width: 700px) { .stats { grid-template-columns: repeat(4, 1fr); } }
.stat { display: block; padding: 14px 14px 14px 0; border-bottom: 1px solid var(--rule); color: var(--ink); }
.stat + .stat { padding-left: 14px; border-left: 1px solid var(--rule); }
@media (max-width: 699px) { .stat:nth-child(3) { padding-left: 0; border-left: 0; } }
.stat .num { font-family: var(--serif); font-size: 2rem; line-height: 1.1; }
.stat .lbl { font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--subtle); }
.stat.red .num { color: var(--red); }
.stat.amber .num { color: var(--amber); }
.stat.blue .num { color: var(--blue); }

/* ---------- Aufgaben-Zeilen ---------- */
.task-list { display: flex; flex-direction: column; border-top: 1px solid var(--rule); }
.task-row {
  position: relative; display: flex; align-items: center; gap: 14px; padding: 14px 4px 14px 14px;
  border-bottom: 1px solid var(--rule); color: var(--ink); background: transparent;
}
.task-row:hover { background: var(--paper); color: var(--ink); }
.task-row::before { content: ''; position: absolute; left: 0; top: 14px; bottom: 14px; width: 2px; background: var(--rule); }
.task-row.is-red::before { background: var(--red); }
.task-row.is-amber::before { background: var(--amber); }
.task-row.is-blue::before { background: var(--blue); }
.task-row.is-done { opacity: .55; }
.task-main { flex: 1; min-width: 0; }
.task-title { font-weight: 500; font-size: 1rem; line-height: 1.35; }
.task-row.is-done .task-title { text-decoration: line-through; text-decoration-color: var(--subtle); }
.task-meta { font-size: .82rem; color: var(--muted); margin: 2px 0 6px; }
.task-meta:last-child { margin-bottom: 0; }
.task-room { width: 48px; flex: none; text-align: center; }
.task-room strong { display: block; font-family: var(--serif); font-size: 1.3rem; font-weight: 500; line-height: 1.1; }
.task-room small { display: block; font-size: .64rem; color: var(--subtle); line-height: 1.2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.task-row .arrow { color: var(--subtle); flex: none; }
.task-row .quick { flex: none; }
.tick {
  width: 24px; height: 24px; flex: none; border: 1.5px solid var(--ink); border-radius: 50%; background: transparent; cursor: pointer;
  display: grid; place-items: center; padding: 0; color: var(--cream);
}
.tick:hover { background: var(--paper-2); }
.tick.on { background: var(--ink); }
.tick.on::after { content: ''; width: 9px; height: 5px; border: solid var(--cream); border-width: 0 0 1.8px 1.8px; transform: rotate(-45deg) translate(1px, -1px); }
.tick:disabled { opacity: .4; cursor: default; }
.space-tag { display: inline-flex; align-items: center; gap: 5px; font-size: .74rem; color: var(--muted); }

/* ---------- Detail ---------- */
.kv { display: grid; grid-template-columns: 130px 1fr; gap: 8px 14px; margin: 16px 0 0; padding-top: 14px; border-top: 1px solid var(--rule-2); font-size: .93rem; }
.kv dt { color: var(--subtle); font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; padding-top: 3px; }
.kv dd { margin: 0; color: var(--text); overflow-wrap: anywhere; }
.kv a { text-decoration: underline; text-decoration-color: var(--rule); text-underline-offset: 3px; }
@media (max-width: 480px) { .kv { grid-template-columns: 1fr; gap: 2px; } .kv dd { margin-bottom: 8px; } }
.status-line { margin-top: 12px; font-size: .92rem; color: var(--text); }
.stepper { display: flex; list-style: none; padding: 0; margin: 16px 0 4px; counter-reset: s; overflow-x: auto; }
.stepper li { flex: 1; min-width: 74px; position: relative; padding-top: 16px; font-size: .68rem; letter-spacing: .06em; text-transform: uppercase; color: var(--subtle); }
.stepper li::before { content: ''; position: absolute; top: 4px; left: 0; right: 0; height: 1px; background: var(--rule); }
.stepper li::after { content: ''; position: absolute; top: 0; left: 0; width: 9px; height: 9px; border-radius: 50%; background: var(--cream); border: 1px solid var(--rule); }
.stepper li.done { color: var(--ink); }
.stepper li.done::before { background: var(--ink); }
.stepper li.done::after { background: var(--ink); border-color: var(--ink); }
.stepper li.current { color: var(--ink); font-weight: 600; }
.stepper li.current::after { background: var(--accent); border-color: var(--accent); }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { position: relative; padding: 0 0 16px 18px; border-left: 1px solid var(--rule); margin-left: 4px; }
.timeline li:last-child { padding-bottom: 0; }
.timeline li::before { content: ''; position: absolute; left: -4px; top: 6px; width: 7px; height: 7px; border-radius: 50%; background: var(--ink); }
.timeline li.is-comment::before { background: var(--accent); }
.timeline .when { font-size: .78rem; color: var(--subtle); }
.timeline .note { margin-top: 4px; white-space: pre-wrap; color: var(--text); font-size: .93rem; }
.timeline li.is-comment .note { font-family: var(--serif); font-size: 1.02rem; }
.comment-form { display: flex; gap: 8px; align-items: flex-end; margin-bottom: 18px; }
.comment-form textarea { flex: 1; border: 0; border-bottom: 1px solid var(--rule); background: transparent; padding: 8px 0; resize: none; outline: none; min-height: 40px; }
.comment-form textarea:focus { border-bottom-color: var(--ink); }
.photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 6px; margin-top: 14px; }
.photos img { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; border-radius: var(--radius); }
.files { list-style: none; padding: 0; margin: 0; }
.files li { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--rule-2); }
.files li:last-child { border-bottom: 0; }
.file-thumb { width: 48px; height: 48px; flex: none; display: grid; place-items: center; background: var(--paper-2); overflow: hidden; border-radius: var(--radius); color: var(--muted); }
.file-thumb img { width: 100%; height: 100%; object-fit: cover; }
.file-main { flex: 1; min-width: 0; }
.file-name { display: block; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.md p { margin: 0 0 10px; }
.md ul, .md ol { margin: 0 0 10px; padding-left: 20px; color: var(--text); }
.md-h { font-size: 1.1rem; margin: 12px 0 6px; }
.md-table { overflow-x: auto; margin-bottom: 10px; }
.md table { border-collapse: collapse; width: 100%; font-size: .9rem; }
.md th, .md td { text-align: left; padding: 6px 10px 6px 0; border-bottom: 1px solid var(--rule-2); }
.md a { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--rule); }
.checklist { margin: 0; padding: 0; list-style: none; }
.checklist li { display: flex; align-items: center; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--rule-2); }
.checklist li:last-child { border-bottom: 0; }
.checklist .txt { flex: 1; }
.checklist .done .txt, .check-row .done { text-decoration: line-through; color: var(--subtle); }
.checklist .by { font-size: .72rem; color: var(--subtle); }
.check-row { display: flex; align-items: center; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--rule-2); }
.progress-line { height: 2px; background: var(--rule-2); margin-top: 6px; }
.progress-line span { display: block; height: 100%; background: var(--ink); }

/* ---------- Modal ---------- */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 100; background: rgba(24, 22, 20, .38);
  display: flex; align-items: flex-end; justify-content: center; animation: fade .15s;
}
.modal {
  width: 100%; max-width: 560px; max-height: 92vh; overflow-y: auto; background: var(--cream);
  border-top: 2px solid var(--ink); padding-bottom: var(--safe-b); animation: up .2s;
}
@media (min-width: 640px) { .modal-backdrop { align-items: center; padding: 20px; } .modal { max-height: 86vh; } }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 16px 18px 12px; position: sticky; top: 0; background: var(--cream); z-index: 1; border-bottom: 1px solid var(--rule-2); }
.modal-head h2 { font-size: 1.3rem; }
.modal-close { border: 0; background: none; cursor: pointer; color: var(--ink); width: 36px; height: 36px; display: grid; place-items: center; }
.modal-body { padding: 18px; }
@keyframes fade { from { opacity: 0; } }
@keyframes up { from { transform: translateY(20px); opacity: .6; } }
.send-options { display: flex; flex-direction: column; border-top: 1px solid var(--rule); }
.send-opt {
  display: flex; align-items: center; gap: 14px; padding: 13px 4px; border: 0; border-bottom: 1px solid var(--rule);
  background: none; text-align: left; cursor: pointer; color: var(--ink); width: 100%;
}
.send-opt:hover { background: var(--paper); color: var(--ink); }
.send-opt .ico { width: 36px; height: 36px; display: grid; place-items: center; flex: none; border: 1px solid var(--rule); border-radius: 50%; color: var(--ink); }
.send-opt strong { display: block; font-weight: 500; }
.send-opt small { display: block; color: var(--muted); font-size: .82rem; }
.send-opt input { accent-color: var(--ink); }
.msg-preview { white-space: pre-wrap; background: var(--paper); border: 1px solid var(--rule); padding: 12px; margin-bottom: 14px; font-size: .88rem; max-height: 190px; overflow-y: auto; color: var(--text); }

#toast {
  position: fixed; left: 50%; bottom: calc(var(--nav-h) + var(--safe-b) + 16px); transform: translate(-50%, 20px); z-index: 200;
  background: var(--ink); color: var(--cream); padding: 10px 18px; font-size: .9rem; opacity: 0; pointer-events: none;
  transition: opacity .2s, transform .2s; max-width: calc(100% - 32px);
}
#toast.show { opacity: 1; transform: translate(-50%, 0); }
@media (min-width: 900px) { #toast { bottom: 28px; } }

/* ---------- Anmeldung ---------- */
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
.login-card { width: 100%; max-width: 400px; background: transparent; border: 0; padding: 0; }
.login-logo { text-align: center; margin-bottom: 34px; }
.login-logo img { width: 230px; max-width: 80%; }
.login-logo .tag { display: block; margin-top: 10px; font-size: .7rem; letter-spacing: .24em; color: var(--subtle); text-transform: uppercase; }
.login-logo .product { display: block; margin-top: 28px; font-family: var(--cond); font-weight: 800; letter-spacing: .22em; font-size: .9rem; }

/* ---------- Übersicht ---------- */
.notif-list { display: flex; flex-direction: column; border-top: 1px solid var(--rule); }
.notif { display: block; padding: 12px 4px 12px 16px; border-bottom: 1px solid var(--rule); position: relative; color: var(--ink); }
.notif:hover { background: var(--paper); color: var(--ink); }
.notif.unread::before { content: ''; position: absolute; left: 2px; top: 19px; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.notif-title { font-weight: 500; }
.notif:not(.unread) .notif-title { font-weight: 400; color: var(--text); }
.notif-body { font-size: .86rem; color: var(--muted); white-space: pre-line; }
.notif-when { font-size: .74rem; color: var(--subtle); margin-top: 2px; }
.home-grid { display: grid; gap: 0 36px; }
@media (min-width: 1000px) { .home-grid { grid-template-columns: 1.25fr 1fr; } }
.push-cta { display: flex; gap: 14px; align-items: center; }
.push-cta .i { width: 26px; height: 26px; }

/* ---------- Bereiche ---------- */
.space-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.space-card {
  display: flex; flex-direction: column; gap: 10px; padding: 18px; min-height: 150px; position: relative;
  background: var(--paper); border: 1px solid var(--rule); border-radius: var(--radius); color: var(--ink);
}
.space-card:hover { border-color: var(--ink); color: var(--ink); }
.space-card::before { content: ''; position: absolute; left: -1px; top: -1px; right: -1px; height: 3px; background: var(--c, var(--ink)); }
.space-card h3 { font-size: 1.3rem; }
.space-card .meta { font-size: .8rem; color: var(--muted); margin-top: auto; display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: center; }
.space-card .meta b { color: var(--ink); font-weight: 600; }
.space-card .meta .warn { color: var(--red); }
.space-card.is-closed { opacity: .6; }
.space-head { display: flex; gap: 16px; align-items: flex-start; justify-content: space-between; margin-bottom: 18px; flex-wrap: wrap; }
.space-head h1 { font-size: 2rem; }
.space-mark { width: 12px; height: 12px; border-radius: 50%; display: inline-block; margin-right: 10px; vertical-align: middle; }
.contact-list { display: grid; gap: 4px; }
.contact-list a { display: inline-flex; align-items: center; gap: 8px; color: var(--text); }
.member-row { display: flex; align-items: center; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--rule-2); }
.member-row:last-child { border-bottom: 0; }
.member-row .who { flex: 1; }
.member-row select { width: auto; border: 1px solid var(--rule); background: var(--paper); padding: 6px 8px; border-radius: var(--radius); font-size: .86rem; }

/* ---------- Zimmer ---------- */
.floor { margin-top: 22px; }
.floor-head { display: flex; align-items: baseline; justify-content: space-between; border-bottom: 1px solid var(--ink); padding-bottom: 6px; margin-bottom: 10px; }
.floor-head h2 { font-size: 1.1rem; }
.floor-head .muted { font-size: .8rem; }
.rooms { display: grid; grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: 6px; }
.room {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  aspect-ratio: 1 / .86; background: var(--paper); border: 1px solid var(--rule); border-radius: var(--radius);
  color: var(--ink); cursor: pointer; padding: 6px 4px; font: inherit;
}
.room:hover { border-color: var(--ink); color: var(--ink); }
.room .no { font-family: var(--serif); font-size: 1.3rem; line-height: 1; }
.room .cat { font-size: .6rem; color: var(--subtle); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-transform: uppercase; letter-spacing: .04em; }
.room .cnt { position: absolute; top: 4px; right: 4px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 9px; font-size: .66rem; font-weight: 700; display: grid; place-items: center; background: var(--ink); color: var(--cream); }
.room.s-red { border-color: var(--red); box-shadow: inset 0 -3px 0 var(--red); }
.room.s-red .cnt { background: var(--red); }
.room.s-amber { box-shadow: inset 0 -3px 0 var(--amber); }
.room.s-amber .cnt { background: var(--amber); }
.room.s-blue { box-shadow: inset 0 -3px 0 var(--blue); }
.room.s-blue .cnt { background: var(--blue); }
.chk {
  display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; font-size: .66rem; font-weight: 700; font-style: normal; line-height: 1;
}
.room .chk { position: absolute; top: 4px; left: 4px; }
.chk-ok { background: var(--green); color: #fff; }
.chk-soon { background: var(--paper); color: var(--green); box-shadow: inset 0 0 0 1.5px var(--amber); }
.chk-due { background: var(--paper-2); color: var(--subtle); box-shadow: inset 0 0 0 1px var(--rule); }
.chk-maengel { background: var(--red); color: #fff; }
.chk-lg { width: 40px; height: 40px; font-size: 1.1rem; }
.legend { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: .78rem; color: var(--muted); margin: 6px 0; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { display: inline-block; width: 14px; height: 10px; border: 1px solid var(--rule); background: var(--paper); }
.legend .l-amber { box-shadow: inset 0 -3px 0 var(--amber); }
.legend .l-red { border-color: var(--red); box-shadow: inset 0 -3px 0 var(--red); }
.legend .l-blue { box-shadow: inset 0 -3px 0 var(--blue); }
.progress { display: flex; height: 6px; background: var(--rule-2); overflow: hidden; }
.progress span { height: 100%; }
.p-ok { background: var(--green); } .p-soon { background: var(--amber); } .p-maengel { background: var(--red); }
.check-summary { display: block; color: var(--ink); }
.check-summary:hover { color: var(--ink); border-color: var(--ink); }
.room-hero { display: flex; align-items: center; gap: 16px; }
.room-hero .big { font-family: var(--serif); font-size: 3rem; line-height: 1; }
.facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px 18px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--rule-2); }
.facts small { display: block; font-size: .68rem; letter-spacing: .1em; text-transform: uppercase; color: var(--subtle); }
.check-head { display: flex; align-items: center; gap: 14px; }
.check-card.cs-ok { border-left: 3px solid var(--green); }
.check-card.cs-soon { border-left: 3px solid var(--amber); }
.check-card.cs-due { border-left: 3px solid var(--rule); }
.check-card.cs-maengel { border-left: 3px solid var(--red); }
.check-hist { margin-top: 12px; }
.check-hist summary { cursor: pointer; font-size: .74rem; letter-spacing: .1em; text-transform: uppercase; color: var(--subtle); }
.rz.rz-1 { background: var(--green-bg); border-color: var(--green); }
.rz.rz-0 { background: var(--paper-2); border-color: var(--subtle); }
.rz.rz-0 .no { color: var(--subtle); text-decoration: line-through; }
.rz-summary { display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: center; font-size: .9rem; }
.rz-summary span { display: inline-flex; align-items: center; gap: 6px; }
.rz-dot { display: inline-block; width: 12px; height: 12px; border: 1px solid var(--rule); background: var(--paper); }
.rz-dot.rz-1 { background: var(--green-bg); border-color: var(--green); }
.rz-dot.rz-0 { background: var(--paper-2); border-color: var(--subtle); }
.settings-table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.settings-table th, .settings-table td { text-align: left; padding: 6px 8px 6px 0; border-bottom: 1px solid var(--rule-2); }
.settings-table th { font-size: .68rem; letter-spacing: .1em; text-transform: uppercase; color: var(--subtle); font-weight: 500; }
.settings-table input { width: 90px; border: 0; border-bottom: 1px solid var(--rule); background: transparent; padding: 4px 0; }

/* ---------- Einkauf ---------- */
.shop-add { display: flex; gap: 8px; align-items: flex-end; position: sticky; top: 62px; z-index: 5; background: var(--cream); padding: 10px 0; }
@media (min-width: 900px) { .shop-add { top: 67px; } }
.shop-add input { flex: 1; min-width: 0; border: 0; border-bottom: 1px solid var(--ink); background: transparent; padding: 10px 0; font-size: 1.05rem; outline: none; }
.shop-add .qty { flex: 0 0 90px; }
.shop-section { margin-top: 18px; }
.shop-section h3 { font-family: var(--sans); font-size: .7rem; letter-spacing: .14em; text-transform: uppercase; color: var(--subtle); font-weight: 500; margin-bottom: 2px; }
.shop-items { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule); }
.shop-item { display: flex; align-items: center; gap: 14px; padding: 12px 2px; border-bottom: 1px solid var(--rule); cursor: pointer; user-select: none; -webkit-user-select: none; }
.shop-item .tick { width: 28px; height: 28px; }
.shop-item .name { flex: 1; font-size: 1.08rem; }
.shop-item .qty { font-size: .9rem; color: var(--muted); }
.shop-item .note { display: block; font-size: .8rem; color: var(--subtle); }
.shop-item.on .name { text-decoration: line-through; color: var(--subtle); }
.shop-item.on .qty { color: var(--subtle); }
.shop-item .edit { border: 0; background: none; color: var(--subtle); padding: 4px; cursor: pointer; }
.suggest { display: flex; flex-wrap: wrap; gap: 6px; }
.suggest .chip.on { background: var(--ink); color: var(--cream); border-color: var(--ink); }
.shop-progress { font-family: var(--serif); font-size: 1.1rem; }

/* ---------- Chat ---------- */
.view-chat { padding-bottom: 0; }
.chat { display: grid; grid-template-columns: 1fr; height: calc(100vh - 67px - var(--nav-h) - var(--safe-b) - 22px); min-height: 380px; }
.chat .card { margin: 0; }
.chat-list { overflow-y: auto; padding: 8px 0; background: transparent; border: 0; }
.chat.has-conv .chat-list { display: none; }
.chat:not(.has-conv) .chat-conv { display: none; }
.chat-list-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 4px 6px; border-bottom: 1px solid var(--ink); margin-bottom: 2px; }
.chat-list-head h2 { font-size: 1.05rem; }
.chat-item { display: block; padding: 11px 4px 11px 10px; border-bottom: 1px solid var(--rule-2); color: var(--ink); }
.chat-item:hover, .chat-item.on { background: var(--paper); color: var(--ink); }
.chat-item-top { display: flex; align-items: center; gap: 6px; }
.chat-item-top strong { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-item-when { margin-left: auto; font-size: .72rem; color: var(--subtle); flex: none; }
.chat-item-last { font-size: .84rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: flex; gap: 6px; align-items: center; }
.chat-item.has-unread strong { font-weight: 700; }
.chat-unread { background: var(--accent); color: #fff; border-radius: 9px; font-size: .66rem; font-weight: 700; padding: 1px 6px; flex: none; }
.chat-conv { display: flex; flex-direction: column; min-height: 0; padding: 0; position: relative; }
.chat-head { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--rule); }
.chat-head .grow { flex: 1; min-width: 0; }
.chat-head strong { font-family: var(--serif); font-weight: 500; font-size: 1.15rem; }
.chat-back { display: grid; place-items: center; width: 34px; height: 34px; }
.chat-msgs { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 3px; background: var(--cream); }
.msg { display: flex; flex-direction: column; align-items: flex-start; max-width: 82%; position: relative; }
.msg.me { align-self: flex-end; align-items: flex-end; }
.msg-name { font-size: .72rem; color: var(--subtle); margin: 8px 0 2px 2px; letter-spacing: .04em; }
.msg-bubble { background: var(--paper); border: 1px solid var(--rule); padding: 8px 12px 6px; border-radius: 14px 14px 14px 3px; max-width: 100%; }
.msg.me .msg-bubble { background: var(--ink); color: var(--cream); border-color: var(--ink); border-radius: 14px 14px 3px 14px; }
.msg-text { white-space: normal; overflow-wrap: anywhere; line-height: 1.45; }
.msg-text a { text-decoration: underline; text-underline-offset: 2px; }
.msg-time { display: block; text-align: right; font-size: .64rem; opacity: .6; margin-top: 2px; }
.msg.deleted .msg-bubble { font-style: italic; opacity: .6; }
.msg-more { position: absolute; top: 50%; right: -30px; transform: translateY(-50%); border: 0; background: none; color: var(--subtle); cursor: pointer; opacity: 0; width: 28px; height: 28px; display: grid; place-items: center; }
.msg.me .msg-more { right: auto; left: -30px; }
.msg:hover .msg-more { opacity: 1; }
@media (pointer: coarse) { .msg-more { opacity: .6; } }
.msg-day { align-self: center; font-size: .68rem; letter-spacing: .12em; text-transform: uppercase; color: var(--subtle); margin: 14px 0 6px; }
.chat-img img { display: block; max-width: 240px; max-height: 260px; border-radius: 8px; margin-bottom: 4px; }
.chat-file { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.msg.me .chat-file .muted { color: rgba(250,247,242,.7); }
.chat-ref { display: flex; align-items: center; gap: 10px; padding: 8px 10px; margin: 2px 0 4px; border: 1px solid var(--rule); background: var(--cream); color: var(--ink); border-radius: 8px; min-width: 200px; }
.msg.me .chat-ref { border-color: rgba(250,247,242,.3); background: rgba(250,247,242,.08); color: var(--cream); }
.chat-ref small { display: block; font-size: .66rem; letter-spacing: .1em; text-transform: uppercase; opacity: .7; }
.chat-ref strong { font-weight: 500; }
.msg-seen { font-size: .64rem; color: var(--subtle); margin-top: 2px; }
.chat-newpill { position: absolute; bottom: 80px; left: 50%; transform: translateX(-50%); z-index: 2; }
.chat-compose { display: flex; align-items: flex-end; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--rule); background: var(--paper); }
.chat-compose textarea { flex: 1; border: 0; background: transparent; resize: none; outline: none; padding: 9px 0; max-height: 140px; line-height: 1.4; }
.chat-attach { width: 40px; height: 40px; display: grid; place-items: center; cursor: pointer; color: var(--muted); flex: none; }
.chat-send { width: 42px; height: 42px; border-radius: 50%; padding: 0; min-height: 0; }
.chat-filebar { padding: 6px 14px; font-size: .84rem; background: var(--paper-2); display: flex; align-items: center; gap: 8px; }
.chat-older { align-self: center; margin-bottom: 8px; }
@media (min-width: 900px) {
  .view-chat { max-width: none; padding: 0; }
  .chat { grid-template-columns: 300px 1fr; height: calc(100vh - 67px); }
  .chat .chat-list, .chat.has-conv .chat-list { display: block; border-right: 1px solid var(--rule); padding: 18px 16px; }
  .chat:not(.has-conv) .chat-conv { display: flex; }
  .chat-conv { border: 0; }
  .chat-back { display: none; }
}

/* ---------- Öffentliche Link-Seiten ---------- */
body.public { background: var(--cream); }
.pub-top { padding: calc(var(--safe-t) + 16px) 18px 14px; border-bottom: 1px solid var(--rule); }
.public-main { max-width: 640px; margin: 0 auto; padding: 22px 16px 60px; }
.task-public h1 { margin: 6px 0 8px; }
.pub-actions { display: grid; gap: 8px; }
body.public #toast { bottom: 24px; }

/* ---------- Kleinigkeiten ---------- */
.row { display: flex; align-items: center; gap: 10px; }
.row.between { justify-content: space-between; }
.wrap { flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
.mt0 { margin-top: 0 !important; }
.mb0 { margin-bottom: 0 !important; }
.version { font-size: .72rem; color: var(--subtle); }
.hint-install { display: flex; gap: 12px; align-items: flex-start; }
kbd { font-family: var(--sans); font-size: .8em; border: 1px solid var(--rule); padding: 0 4px; border-radius: 3px; background: var(--paper); }
/* ---------- Kalender (1.2) ---------- */
.ampel { display: inline-block; width: 10px; height: 10px; border-radius: 50%; flex: none; vertical-align: -1px; background: var(--rule); }
.amp-rot { background: #B8372A; }
.amp-orange { background: #DE8A1F; }
.amp-gruen { background: #3F8A55; }
.ampel-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; margin-top: 12px; }
.kz { display: inline-block; font-size: .68rem; font-weight: 600; letter-spacing: .06em; padding: 0 5px; border: 1px solid var(--rule); background: var(--paper); color: var(--ink); line-height: 1.5; }
.kz-group { letter-spacing: 0; font-weight: 500; }
.kz-none { color: var(--subtle); font-weight: 400; letter-spacing: 0; }
.who-filter { margin: 0 0 12px; padding: 6px 10px; border: 1px solid var(--rule); background: var(--paper); max-width: 100%; }
.seg-sm span { padding: 4px 10px !important; font-size: .82rem; }
.seg span.cat-dot { padding: 0; border: 0; border-radius: 50%; margin-right: 3px; vertical-align: 0; }
.cal-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.cal-title { min-width: 9.5em; text-align: center; text-transform: capitalize; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-top: 1px solid var(--rule); border-left: 1px solid var(--rule); }
.cal-wd { font-size: .68rem; letter-spacing: .12em; text-transform: uppercase; color: var(--subtle); padding: 4px 6px; border-right: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.cal-day { min-height: 104px; padding: 4px; border-right: 1px solid var(--rule); border-bottom: 1px solid var(--rule); background: var(--paper); cursor: pointer; min-width: 0; }
.cal-day.other { background: var(--cream); }
.cal-day.other .cal-num { color: var(--subtle); }
.cal-day.sel { outline: 2px solid var(--ink); outline-offset: -2px; }
.cal-num { display: inline-block; min-width: 22px; text-align: center; font-size: .78rem; line-height: 22px; }
.cal-day.today .cal-num { background: var(--ink); color: var(--cream); }
.cal-ev { display: flex; align-items: center; gap: 4px; margin-top: 3px; padding: 1px 4px; font-size: .72rem; line-height: 1.35;
  border-left: 3px solid var(--c); background: var(--paper-2); color: var(--ink); overflow: hidden; }
.cal-ev .t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal-ev .ampel { width: 7px; height: 7px; }
.cal-more { display: block; font-size: .7rem; color: var(--subtle); margin-top: 2px; }
@media (max-width: 699px) {
  .cal-day { min-height: 58px; padding: 2px; }
  .cal-ev { pointer-events: none; height: 6px; padding: 0; margin-top: 2px; border-left: 0; background: var(--c); }
  .cal-ev .t, .cal-ev .ampel { display: none; }
  .cal-more { font-size: .62rem; }
}
.ev-row { padding-left: 14px; }
.ev-row::before { display: none; }
.ev-row .ev-bar { position: absolute; left: 0; top: 10px; bottom: 10px; width: 4px; background: var(--c); }
.sub-head.is-today { color: var(--ink); }
.todos { list-style: none; margin: 0; padding: 0; }
.todos .todo { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--rule-2); }
.todos .todo:last-child { border-bottom: 0; }
.todo-main { flex: 1; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; min-width: 0; color: var(--ink); }
.todo.done .todo-t { text-decoration: line-through; color: var(--subtle); }
.todo-act { display: flex; align-items: center; gap: 8px; flex: none; }
.todo-edit { display: grid; grid-template-columns: 1fr 1fr 9.5em auto; gap: 6px; margin-bottom: 6px; align-items: center; }
.todo-edit input, .todo-edit select { min-width: 0; width: 100%; }
@media (max-width: 640px) { .todo-edit { grid-template-columns: 1fr auto; } .todo-edit select, .todo-edit input[type=date] { grid-column: 1; } .todo-edit button { grid-row: 1; grid-column: 2; } }

@media print { .topbar, .sidenav, .bottomnav, .btn, .tabs { display: none !important; } .view { padding: 0; } body { background: #fff; } }
