/* Schriften werden beim Docker-Build nach /fonts geladen (selbst gehostet). Fehlen sie, greift die Systemschrift. */
@font-face { font-family: 'Bricolage Grotesque'; font-weight: 500; font-display: swap; src: url(fonts/bricolage-grotesque-latin-500-normal.woff2) format('woff2'); }
@font-face { font-family: 'Bricolage Grotesque'; font-weight: 600; font-display: swap; src: url(fonts/bricolage-grotesque-latin-600-normal.woff2) format('woff2'); }
@font-face { font-family: 'Bricolage Grotesque'; font-weight: 700; font-display: swap; src: url(fonts/bricolage-grotesque-latin-700-normal.woff2) format('woff2'); }
@font-face { font-family: 'Bricolage Grotesque'; font-weight: 800; font-display: swap; src: url(fonts/bricolage-grotesque-latin-800-normal.woff2) format('woff2'); }
@font-face { font-family: 'Atkinson Hyperlegible'; font-weight: 400; font-display: swap; src: url(fonts/atkinson-hyperlegible-latin-400-normal.woff2) format('woff2'); }
@font-face { font-family: 'Atkinson Hyperlegible'; font-weight: 700; font-display: swap; src: url(fonts/atkinson-hyperlegible-latin-700-normal.woff2) format('woff2'); }

:root {
  --paper: #eef2ee;
  --surface: #ffffff;
  --surface-2: #f6f8f6;
  --ink: #1c2925;
  --muted: #5f6e68;
  --line: #d6ded8;
  --accent: #2e6a55;
  --accent-ink: #ffffff;
  --accent-soft: #dcebe4;
  --late: #a3610a;
  --danger: #b3261e;
  --bday: #d9417e;
  --shadow: 0 1px 0 rgba(28, 41, 37, .06), 0 8px 24px -12px rgba(28, 41, 37, .25);
  --r-s: 8px;
  --r-m: 14px;
  --r-l: 22px;
  --head: 'Bricolage Grotesque', 'Segoe UI', system-ui, sans-serif;
  --body: 'Atkinson Hyperlegible', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --nav-h: 64px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #111715;
    --surface: #1a2220;
    --surface-2: #212b28;
    --ink: #e5ece8;
    --muted: #96a59e;
    --line: #2d3935;
    --accent: #79c2a2;
    --accent-ink: #0f1a16;
    --accent-soft: #24392f;
    --late: #e3a548;
    --danger: #f2877d;
    --bday: #f07aa8;
    --shadow: 0 1px 0 rgba(0, 0, 0, .3), 0 10px 28px -14px rgba(0, 0, 0, .7);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--paper);
  color: var(--ink);
  font: 16px/1.45 var(--body);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior-y: contain;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
h1, h2, h3 { font-family: var(--head); margin: 0; letter-spacing: -.01em; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- Grundgerüst ---------- */
#app { min-height: 100%; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 12px;
  padding: calc(10px + env(safe-area-inset-top)) 16px 10px;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(12px);
}
.topbar h1 { font-size: 22px; font-weight: 700; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.offline-pill { font-size: 13px; padding: 3px 10px; border-radius: 99px; background: var(--late); color: #fff; }
.me-btn {
  border: 0; background: none; padding: 0; display: flex; align-items: center; gap: 8px;
}
main { flex: 1; padding: 4px 16px calc(var(--nav-h) + 96px + env(safe-area-inset-bottom)); max-width: 760px; width: 100%; margin: 0 auto; }

.nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  display: grid; grid-template-columns: repeat(5, 1fr);
  height: calc(var(--nav-h) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  background: var(--surface); border-top: 1px solid var(--line);
}
.nav button {
  border: 0; background: none; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  font-size: 12px; color: var(--muted); position: relative;
}
.nav button svg { width: 24px; height: 24px; }
.nav button[aria-current="page"] { color: var(--accent); font-weight: 700; }
.nav button[aria-current="page"]::before {
  content: ''; position: absolute; top: 0; left: 28%; right: 28%; height: 3px; border-radius: 0 0 3px 3px; background: var(--accent);
}
.nav .badge {
  position: absolute; top: 8px; left: calc(50% + 6px); min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 9px; background: var(--accent); color: var(--accent-ink); font-size: 11px; font-weight: 700; line-height: 18px;
}

.fab {
  position: fixed; right: 18px; bottom: calc(var(--nav-h) + 18px + env(safe-area-inset-bottom)); z-index: 25;
  width: 60px; height: 60px; border-radius: 20px; border: 0;
  background: var(--accent); color: var(--accent-ink); box-shadow: var(--shadow);
  display: grid; place-items: center;
}
.fab svg { width: 28px; height: 28px; }

/* ---------- Avatare & Farbbänder ---------- */
.avatar {
  width: 34px; height: 34px; border-radius: 50%; flex: none;
  display: grid; place-items: center; font-family: var(--head); font-weight: 700; font-size: 15px;
  background: var(--c, var(--muted)); color: var(--c-ink, #fff);
}
.avatar.sm { width: 24px; height: 24px; font-size: 12px; }
.avatar.lg { width: 48px; height: 48px; font-size: 20px; }
.stack { display: flex; }
.stack .avatar { box-shadow: 0 0 0 2px var(--surface); }
.stack .avatar + .avatar { margin-left: -7px; }

.band {
  width: 6px; align-self: stretch; border-radius: 3px; flex: none;
  background: var(--band, var(--line));
}

/* ---------- Cockpit ---------- */
.today-head { padding: 14px 0 18px; }
.today-head .weekday {
  font-family: var(--head); font-weight: 800; font-size: clamp(48px, 15vw, 84px); line-height: .92; letter-spacing: -.035em;
}
.today-head .date { font-family: var(--head); font-size: 22px; font-weight: 500; color: var(--muted); margin-top: 6px; }
.section { margin: 26px 0 0; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.section-head h2 { font-size: 19px; font-weight: 700; }
.link-btn { border: 0; background: none; color: var(--accent); font-weight: 700; padding: 6px 0; }

.card { background: var(--surface); border-radius: var(--r-m); box-shadow: var(--shadow); overflow: hidden; }
.empty { padding: 18px; color: var(--muted); }
.quick {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px;
}
.quick button {
  border: 0; text-align: left; background: var(--surface); box-shadow: var(--shadow); border-radius: var(--r-m);
  padding: 12px 12px 10px; display: flex; flex-direction: column; gap: 2px; min-width: 0;
}
.quick .num { font-family: var(--head); font-size: 30px; font-weight: 800; line-height: 1; }
.quick .lbl { font-size: 13px; color: var(--muted); }
.quick .num.late { color: var(--late); }

/* ---------- Listenzeilen ---------- */
.row {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px; min-height: 56px;
  border: 0; width: 100%; background: none; text-align: left;
}
.row + .row { border-top: 1px solid var(--line); }
.row .main { flex: 1; min-width: 0; }
.row .title { font-weight: 700; overflow-wrap: anywhere; }
.row .sub { font-size: 14px; color: var(--muted); overflow-wrap: anywhere; }
.row .time { font-family: var(--head); font-weight: 700; font-size: 15px; width: 52px; flex: none; line-height: 1.15; }
.row .time small { display: block; font-weight: 500; color: var(--muted); font-family: var(--body); font-size: 12px; }
.row.done .title { text-decoration: line-through; color: var(--muted); font-weight: 400; }
.row .late { color: var(--late); font-weight: 700; }

.check {
  width: 28px; height: 28px; border-radius: 9px; flex: none; border: 2px solid var(--muted); background: none;
  display: grid; place-items: center; padding: 0;
}
.check svg { width: 18px; height: 18px; opacity: 0; }
.check[aria-checked="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.check[aria-checked="true"] svg { opacity: 1; }

.tag {
  display: inline-block; font-size: 12px; font-weight: 700; padding: 1px 8px; border-radius: 99px;
  background: var(--accent-soft); color: var(--accent); vertical-align: 1px;
}
.tag.exam { background: color-mix(in srgb, var(--late) 18%, transparent); color: var(--late); }
.tag.feed { background: color-mix(in srgb, var(--c) 18%, transparent); color: color-mix(in srgb, var(--c) 70%, var(--ink)); }
.chips .feed-chip { border-style: dashed; }
.preset-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 18px; }
.preset-grid button { border: 1.5px solid var(--line); background: var(--surface-2); border-radius: 12px; padding: 12px; text-align: left; font-weight: 700; }
.preset-grid button small { display: block; font-weight: 400; color: var(--muted); font-size: 13px; margin-top: 2px; }
.preset-grid button[disabled] { opacity: .5; }
.hint { font-size: 14px; color: var(--muted); background: var(--surface-2); border-radius: 10px; padding: 10px 12px; margin: 0 0 14px; }
.file-btn { position: relative; overflow: hidden; display: block; text-align: center; }
.file-btn input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }

/* ---------- Segment / Chips ---------- */
.seg { display: inline-flex; background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 3px; gap: 2px; }
.seg button { border: 0; background: none; padding: 7px 14px; border-radius: 9px; font-weight: 700; color: var(--muted); }
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(0, 0, 0, .12); }

.chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 6px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none; display: inline-flex; align-items: center; gap: 7px; border: 1.5px solid var(--line); background: var(--surface);
  border-radius: 99px; padding: 5px 12px 5px 6px; font-weight: 700; font-size: 14px;
}
.chip.plain { padding: 6px 12px; }
.chip .dot { width: 18px; height: 18px; border-radius: 50%; background: var(--c); }
.chip[aria-pressed="false"] { opacity: .55; }
.chip[aria-pressed="false"] .dot { background: transparent; box-shadow: inset 0 0 0 2px var(--c); }
.chip[aria-pressed="true"] { border-color: var(--c, var(--accent)); }

/* ---------- Kalender ---------- */
.cal-tools { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 6px 0 12px; flex-wrap: wrap; }
.cal-title { display: flex; align-items: center; gap: 4px; }
.cal-title h2 { font-size: 24px; font-weight: 800; min-width: 0; }
.icon-btn {
  width: 40px; height: 40px; border-radius: 12px; border: 0; background: none; display: grid; place-items: center; color: var(--ink);
}
.icon-btn:hover { background: var(--surface-2); }
.icon-btn svg { width: 22px; height: 22px; }

.month { background: var(--surface); border-radius: var(--r-m); box-shadow: var(--shadow); padding: 6px 4px 8px; }
.month .dow, .month .grid { display: grid; grid-template-columns: repeat(7, 1fr); }
.month .dow span { text-align: center; font-size: 12px; color: var(--muted); font-weight: 700; padding: 4px 0 6px; }
.month .day {
  border: 0; background: none; min-height: 62px; padding: 4px 2px; border-radius: 10px;
  display: flex; flex-direction: column; align-items: center; gap: 3px;
}
.month .day .n { font-family: var(--head); font-weight: 600; font-size: 16px; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; }
.month .day.other .n { color: var(--muted); opacity: .5; }
.month .day.weekend .n { color: var(--muted); }
.month .day.today .n { background: var(--accent); color: var(--accent-ink); }
.month .day[aria-selected="true"] { background: var(--accent-soft); }
.month .bars { display: flex; flex-direction: column; gap: 2px; width: 100%; padding: 0 3px; }
.month .bars i { display: block; height: 5px; border-radius: 3px; background: var(--band); }
.month .more { font-size: 10px; color: var(--muted); line-height: 1; }

.day-group { margin-top: 18px; }
.day-group h3 { font-size: 16px; font-weight: 700; margin: 0 0 8px; display: flex; gap: 8px; align-items: baseline; }
.day-group h3 .rel { color: var(--accent); }
.day-group.is-today h3 { color: var(--accent); }

.ev-row { align-items: stretch; }
.ev-row .band { margin: 2px 0; }

/* ---------- Schule ---------- */
.timetable { display: grid; grid-template-columns: 30px repeat(5, 1fr); gap: 4px; }
.timetable .h { font-size: 12px; font-weight: 700; color: var(--muted); text-align: center; padding: 4px 0; }
.timetable .h.now { color: var(--accent); }
.timetable .p { font-family: var(--head); font-weight: 700; color: var(--muted); display: grid; place-items: center; font-size: 14px; }
.timetable .cell {
  border: 0; min-height: 50px; border-radius: 10px; padding: 4px 2px; background: var(--surface); min-width: 0;
  font-size: 12px; font-weight: 700; line-height: 1.15; hyphens: auto; -webkit-hyphens: auto; overflow-wrap: break-word;
  box-shadow: var(--shadow);
}
@media (min-width: 420px) { .timetable .cell { font-size: 13px; } }
.timetable .cell.empty-cell { background: transparent; box-shadow: inset 0 0 0 1.5px var(--line); color: var(--muted); font-weight: 400; }
.timetable .cell small { display: block; font-weight: 400; color: var(--muted); font-size: 11px; }
.timetable .cell.today { box-shadow: inset 0 0 0 2px var(--accent); }

/* ---------- Einkauf ---------- */
.add-line { display: flex; gap: 8px; margin-bottom: 10px; }
.add-line input { flex: 1; min-width: 0; }
.suggest { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 14px; }
.suggest button { border: 1px dashed var(--line); background: var(--surface-2); border-radius: 99px; padding: 5px 12px; font-size: 14px; }

/* ---------- Formulare ---------- */
label.field { display: block; margin: 0 0 14px; }
label.field > span, .field-label { display: block; font-size: 14px; font-weight: 700; margin-bottom: 6px; }
input[type=text], input[type=password], input[type=date], input[type=time], input[type=url], input:not([type]), select, textarea {
  width: 100%; border: 1.5px solid var(--line); background: var(--surface); border-radius: 12px; padding: 11px 12px; min-height: 46px;
}
textarea { min-height: 80px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.toggle { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 14px; font-weight: 700; }
.switch { position: relative; width: 50px; height: 30px; flex: none; }
.switch input { opacity: 0; width: 100%; height: 100%; margin: 0; position: absolute; cursor: pointer; }
.switch i { position: absolute; inset: 0; border-radius: 99px; background: var(--line); pointer-events: none; transition: background .15s; }
.switch i::after { content: ''; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; transition: transform .15s; box-shadow: 0 1px 3px rgba(0, 0, 0, .3); }
.switch input:checked + i { background: var(--accent); }
.switch input:checked + i::after { transform: translateX(20px); }

.btn {
  border: 0; border-radius: 12px; padding: 12px 18px; min-height: 48px; font-weight: 700;
  background: var(--accent); color: var(--accent-ink);
}
.btn.secondary { background: var(--surface-2); color: var(--ink); border: 1.5px solid var(--line); }
.btn.danger { background: none; color: var(--danger); border: 1.5px solid currentColor; }
.btn.block { width: 100%; }
.btn-row { display: flex; gap: 10px; margin-top: 8px; }
.btn-row .btn { flex: 1; }
.error { color: var(--danger); font-weight: 700; margin: 0 0 12px; }

.colors { display: flex; flex-wrap: wrap; gap: 10px; }
.colors button { width: 36px; height: 36px; border-radius: 50%; border: 0; background: var(--c); }
.colors button[aria-pressed="true"] { box-shadow: 0 0 0 3px var(--surface), 0 0 0 5px var(--c); }

/* ---------- Bottom Sheet ---------- */
.scrim { position: fixed; inset: 0; z-index: 50; background: rgba(10, 18, 15, .45); display: flex; align-items: flex-end; justify-content: center; }
.sheet {
  width: 100%; max-width: 620px; max-height: 92vh; overflow-y: auto; background: var(--surface);
  border-radius: var(--r-l) var(--r-l) 0 0; padding: 10px 18px calc(22px + env(safe-area-inset-bottom));
  animation: up .2s ease-out;
}
.sheet .grip { width: 40px; height: 5px; border-radius: 3px; background: var(--line); margin: 0 auto 12px; }
.sheet h2 { font-size: 22px; font-weight: 800; margin-bottom: 16px; }
@keyframes up { from { transform: translateY(40px); opacity: .4; } to { transform: none; opacity: 1; } }
@media (min-width: 700px) {
  .scrim { align-items: center; }
  .sheet { border-radius: var(--r-l); }
}
@media (prefers-reduced-motion: reduce) {
  .sheet { animation: none; }
  .switch i, .switch i::after { transition: none; }
}

.toast {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--nav-h) + 92px + env(safe-area-inset-bottom)); z-index: 60;
  background: var(--ink); color: var(--paper); padding: 10px 16px; border-radius: 12px; font-weight: 700; max-width: calc(100% - 32px);
}

/* ---------- Anmeldung ---------- */
.gate { min-height: 100vh; display: grid; place-items: center; padding: 24px 18px; }
.gate .box { width: 100%; max-width: 420px; }
.gate .logo { width: 64px; height: 64px; border-radius: 18px; margin-bottom: 18px; }
.gate h1 { font-size: 36px; font-weight: 800; line-height: 1.05; margin-bottom: 8px; }
.gate p { color: var(--muted); margin: 0 0 22px; }
.who-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 12px; }
.who-grid button {
  border: 0; background: var(--surface); box-shadow: var(--shadow); border-radius: var(--r-m); padding: 18px 10px;
  display: flex; flex-direction: column; align-items: center; gap: 10px; font-weight: 700;
}
.member-edit { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; }
.member-edit input { flex: 1; }
.member-edit select { width: auto; }
.member-edit .swatch { width: 40px; height: 46px; border-radius: 12px; border: 0; background: var(--c); flex: none; }

.settings-list .row { cursor: pointer; }
.ical-url { font-size: 13px; word-break: break-all; background: var(--surface-2); padding: 10px; border-radius: 10px; margin: 0 0 10px; }
.chip.plain[aria-pressed="true"] { background: var(--accent-soft); border-color: var(--accent); color: var(--ink); }

/* ---------- Update: Notizen, Geburtstage, Suche, Aktivität ---------- */
.tag.bday { background: color-mix(in srgb, var(--bday) 16%, transparent); color: var(--bday); }
.seg.wide { display: flex; width: 100%; }
.seg.wide button { flex: 1; padding: 8px 6px; }
.suggest button { -webkit-touch-callout: none; user-select: none; -webkit-user-select: none; }
.strike { text-decoration: line-through; color: var(--muted); }
.act-row .avatar { align-self: flex-start; margin-top: 2px; }
.or { text-align: center; color: var(--muted); font-size: 14px; margin: 14px 0 10px; }
#pk-login { display: flex; align-items: center; justify-content: center; gap: 8px; }
.settings-list .row > svg { flex: none; color: var(--muted); }
.settings-list label.row input[type=date] { border: 1.5px solid var(--line); border-radius: 10px; padding: 8px; background: var(--surface); color: var(--ink); font: inherit; }

.notes { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.note-card {
  text-align: left; border: 1px solid var(--line); background: var(--surface); border-radius: var(--r-m); padding: 12px 14px;
  box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 6px; color: var(--ink); min-height: 92px;
}
.note-card .title { font-family: var(--head); font-weight: 800; font-size: 17px; overflow-wrap: anywhere; }
.note-card ul { list-style: none; margin: 0; padding: 0; font-size: 14px; display: grid; gap: 2px; }
.note-card li { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.note-card li.t-check::before { content: '☐ '; color: var(--muted); }
.note-card li.t-bullet::before { content: '– '; color: var(--muted); }
.note-card .sub { font-size: 13px; color: var(--muted); margin-top: auto; }
.note-lines { display: grid; gap: 4px; margin-bottom: 4px; }
.note-line { display: flex; align-items: center; gap: 6px; }
.note-line input { flex: 1; min-width: 0; border: 0; border-bottom: 1.5px solid var(--line); background: none; padding: 8px 2px; font: inherit; color: var(--ink); border-radius: 0; }
.note-line input:focus { outline: none; border-bottom-color: var(--accent); }
.note-line.done input { text-decoration: line-through; color: var(--muted); }
.note-line .bullet { width: 28px; text-align: center; font-weight: 800; color: var(--muted); flex: none; }
.icon-btn.small { width: 32px; height: 32px; font-weight: 800; color: var(--muted); flex: none; }
.icon-btn.small svg { width: 18px; height: 18px; }
details.more { margin: 0 0 22px; border: 1px solid var(--line); border-radius: var(--r-m); padding: 10px 14px; background: var(--surface); }
details.more summary { font-weight: 700; cursor: pointer; }
details.more[open] summary { margin-bottom: 10px; }

/* Monatsansicht mit Titeln (wie FAMANICE) */
.month { padding: 6px 2px 8px; }
.month .grid { gap: 0; }
.month .day { min-height: 92px; padding: 3px 1px; align-items: stretch; gap: 2px; border-radius: 6px; border-top: 1px solid var(--line); }
.month .day .n { width: 24px; height: 24px; font-size: 14px; align-self: center; }
.month .chips-m { display: flex; flex-direction: column; gap: 2px; width: 100%; min-width: 0; }
.month .chips-m i {
  display: block; font-style: normal; font-size: 10.5px; line-height: 15px; font-weight: 700; padding: 0 3px;
  border-radius: 3px; white-space: nowrap; overflow: hidden; text-overflow: clip; text-align: left;
}
.month .chips-m .more { font-size: 10.5px; color: var(--muted); text-align: left; padding-left: 3px; }
@media (min-width: 600px) { .month .day { min-height: 110px; } .month .chips-m i { font-size: 12px; line-height: 17px; } }
.month .dow, .month .grid { grid-template-columns: repeat(7, minmax(0, 1fr)); }
.month .day { min-width: 0; overflow: hidden; }

/* Tagesliste wie FAMANICE */
.agenda { border-radius: var(--r-m); overflow: hidden; box-shadow: var(--shadow); }
.ag-head {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  background: #5f9a37; color: #fff; padding: 6px 6px 6px 12px; font-size: 17px; font-weight: 700;
}
.ag-day.is-today .ag-head { color: #ffe94d; }
.ag-add { border: 0; background: none; color: #fff; width: 36px; height: 32px; display: grid; place-items: center; padding: 0; }
.ag-add svg { width: 24px; height: 24px; }
.ag-row {
  position: relative; display: grid; grid-template-columns: 56px 26px 1fr; align-items: start; gap: 4px; width: 100%;
  border: 0; border-bottom: 1px solid rgba(0,0,0,.12); background: var(--bg); color: var(--ink); text-align: left; padding: 8px 10px 8px 12px;
}
.ag-row .stripes { position: absolute; left: 0; top: 0; bottom: 0; width: 6px; display: flex; flex-direction: column; }
.ag-row .stripes i { flex: 1; }
.ag-time { display: flex; flex-direction: column; font-size: 15px; line-height: 1.35; font-variant-numeric: tabular-nums; }
.ag-time b { font-weight: 800; }
.ag-time span { opacity: .85; }
.ag-ic { font-size: 15px; line-height: 1.35; display: flex; flex-direction: column; }
.ag-main { min-width: 0; }
.ag-title { display: block; font-weight: 800; font-size: 17px; line-height: 1.3; overflow-wrap: anywhere; }
.ag-loc { font-weight: 600; opacity: .9; }
.ag-people { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 3px; font-size: 14px; }
.ag-people .who { display: inline-flex; align-items: center; gap: 5px; }
.ag-people .who i { width: 15px; height: 15px; border-radius: 50%; border: 2px solid rgba(255,255,255,.85); box-shadow: 0 0 0 1px rgba(0,0,0,.25); }
.ag-empty { display: block; width: 100%; border: 0; background: var(--surface-2); color: var(--muted); padding: 16px 10px; font-size: 14px; text-align: center; border-bottom: 1px solid var(--line); }

.ntfy-box { border: 1.5px solid var(--accent); border-radius: var(--r-m); padding: 12px 14px; margin: 0 0 12px; background: var(--accent-soft); }
.ntfy-box a { color: var(--accent); font-weight: 700; }
.ntfy-box code { background: var(--surface); padding: 1px 5px; border-radius: 5px; font-size: 13px; overflow-wrap: anywhere; }

/* Anhänge */
.att-list { display: grid; gap: 6px; }
.att { display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 12px; padding: 6px; background: var(--surface); }
.att-open { border: 0; padding: 0; background: none; flex: none; }
.att-open img { width: 56px; height: 56px; object-fit: cover; border-radius: 8px; display: block; background: var(--surface-2); }
.att-doc { width: 56px; height: 56px; border-radius: 8px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); font-weight: 800; font-size: 13px; }
.att-name { flex: 1; min-width: 0; font-size: 14px; overflow-wrap: anywhere; }
.att-add .file-btn { flex: 1; }
.lightbox { position: fixed; inset: 0; z-index: 200; background: rgba(0,0,0,.92); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 16px; }
.lightbox img { max-width: 100%; max-height: calc(100% - 70px); object-fit: contain; border-radius: 6px; }
.lb-bar { display: flex; gap: 18px; align-items: center; }
.lb-bar a, .lb-bar button { color: #fff; background: none; border: 1px solid rgba(255,255,255,.5); border-radius: 10px; padding: 8px 14px; font: inherit; text-decoration: none; }
.sub svg { vertical-align: -3px; }
