:root {
  --bg: #f5f2ec;
  --surface: #ffffff;
  --surface-2: #faf8f4;
  --border: #e4ded3;
  --text: #24313a;
  --muted: #66727b;
  --primary: #2c6e8f;
  --primary-strong: #1f5470;
  --primary-soft: #e3f0f6;
  --accent: #d6573d;
  --sun: #f6b93b;
  --ok: #2f8a4e;
  --ok-soft: #e3f4e8;
  --warn: #b26a00;
  --warn-soft: #fff1d6;
  --danger: #c0392b;
  --danger-soft: #fbe5e2;
  --closed: #9a3b30;
  --closed-soft: #f8e1dd;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(36, 49, 58, .06), 0 4px 16px rgba(36, 49, 58, .06);
  --sidebar: 264px;
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--primary); }
h1, h2, h3, h4 { line-height: 1.25; margin: 0 0 .5em; }
h1 { font-size: 1.75rem; }
h2 { font-size: 1.25rem; }
h3 { font-size: 1.05rem; }
p { margin: 0 0 .75em; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.boot { display: grid; place-items: center; height: 100vh; }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Layout ---------- */
.shell { display: grid; grid-template-columns: var(--sidebar) 1fr; min-height: 100vh; }
.sidebar {
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.brand { display: flex; align-items: center; gap: 12px; padding: 20px 20px 16px; text-decoration: none; color: inherit; }
.brand img { width: 44px; height: 44px; flex: none; }
.brand strong { display: block; font-size: 1.05rem; }
.brand span { font-size: .8rem; color: var(--muted); }
.nav { padding: 8px 12px; display: flex; flex-direction: column; gap: 2px; }
.nav-title { font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding: 16px 12px 6px; }
.nav a {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px; border-radius: 10px;
  color: var(--text); text-decoration: none; font-weight: 500;
}
.nav a:hover { background: var(--surface-2); }
.nav a.active { background: var(--primary-soft); color: var(--primary-strong); font-weight: 650; }
.nav a .ico { width: 22px; text-align: center; font-size: 1.1rem; }
.nav .badge { margin-left: auto; }
.nav.admin { border-top: 1px solid var(--border); margin-top: 8px; padding-top: 4px; }
.userbox { margin-top: auto; padding: 16px 20px; border-top: 1px solid var(--border); font-size: .9rem; }
.userbox .role { display: inline-block; margin: 2px 0 10px; }
.userbox .row { display: flex; gap: 8px; flex-wrap: wrap; }

.main { padding: 28px 36px 64px; max-width: 1400px; width: 100%; }
.topbar { display: none; }
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.page-head p { color: var(--muted); margin: 0; max-width: 70ch; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: fixed; inset: 0 auto 0 0; width: min(300px, 86vw); z-index: 50; transform: translateX(-100%); transition: transform .2s; box-shadow: var(--shadow); }
  .shell.nav-open .sidebar { transform: none; }
  .shell.nav-open::after { content: ""; position: fixed; inset: 0; background: rgba(0,0,0,.3); z-index: 40; }
  .topbar { display: flex; align-items: center; gap: 12px; padding: 10px 16px; background: var(--surface); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 30; }
  .topbar img { width: 32px; height: 32px; }
  .main { padding: 20px 16px 48px; }
  h1 { font-size: 1.45rem; }
}

/* ---------- Komponenten ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; }
.card + .card { margin-top: 16px; }
.grid > .card + .card { margin-top: 0; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.card-head h2, .card-head h3 { margin: 0; }
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.stack > * + * { margin-top: 12px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: 1px solid transparent; border-radius: 10px;
  padding: 9px 16px; font: inherit; font-weight: 600; font-size: .95rem;
  cursor: pointer; text-decoration: none; line-height: 1.2;
  background: var(--primary); color: #fff;
}
.btn:hover { background: var(--primary-strong); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn.secondary { background: var(--surface); color: var(--primary-strong); border-color: var(--border); }
.btn.secondary:hover { background: var(--surface-2); }
.btn.ghost { background: transparent; color: var(--primary-strong); padding: 6px 10px; }
.btn.ghost:hover { background: var(--primary-soft); }
.btn.danger { background: var(--surface); color: var(--danger); border-color: #efc6c0; }
.btn.danger:hover { background: var(--danger-soft); }
.btn.ok { background: var(--ok); }
.btn.ok:hover { background: #256f3e; }
.btn.warn { background: var(--accent); }
.btn.warn:hover { background: #b9452e; }
.btn.small { padding: 6px 10px; font-size: .85rem; border-radius: 8px; }
.btn.big { padding: 13px 22px; font-size: 1.05rem; }
.icon-btn { background: none; border: 0; font-size: 1.4rem; cursor: pointer; padding: 4px 8px; }

.badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 999px; font-size: .78rem; font-weight: 650; white-space: nowrap; background: var(--surface-2); color: var(--muted); border: 1px solid var(--border); }
.badge.open, .badge.ok { background: var(--ok-soft); color: var(--ok); border-color: #bfe3ca; }
.badge.closed { background: var(--closed-soft); color: var(--closed); border-color: #efc6c0; }
.badge.warn { background: var(--warn-soft); color: var(--warn); border-color: #f2d9a6; }
.badge.info { background: var(--primary-soft); color: var(--primary-strong); border-color: #c4dfec; }
.badge.danger { background: var(--danger-soft); color: var(--danger); border-color: #efc6c0; }
.badge.muted { opacity: .8; }
.dot { width: 12px; height: 12px; border-radius: 50%; display: inline-block; flex: none; background: var(--c, #999); box-shadow: 0 0 0 2px #fff, 0 0 0 3px var(--c, #999); }
.chip { display: inline-flex; align-items: center; gap: 7px; padding: 4px 10px 4px 8px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border); font-size: .875rem; font-weight: 600; }
.chip.closed { background: var(--closed-soft); border-color: #efc6c0; color: var(--closed); }
.chip.closed .dot { opacity: .6; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }

.notice { border-radius: 12px; padding: 14px 16px; background: var(--primary-soft); border: 1px solid #c4dfec; }
.notice.warn { background: var(--warn-soft); border-color: #f2d9a6; }
.notice.ok { background: var(--ok-soft); border-color: #bfe3ca; }
.notice.danger { background: var(--danger-soft); border-color: #efc6c0; }
.notice h3 { margin-bottom: .25em; }
.notice ol, .notice ul { margin: 0; padding-left: 1.25em; }

.empty { color: var(--muted); padding: 18px; text-align: center; border: 1px dashed var(--border); border-radius: 12px; background: var(--surface-2); }

/* Formulare */
form .row { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
label.field { display: block; margin-bottom: 12px; }
label.field > span { display: block; font-size: .875rem; font-weight: 600; margin-bottom: 4px; }
label.field small { display: block; color: var(--muted); font-size: .8rem; margin-top: 3px; }
input, select, textarea {
  width: 100%; font: inherit; color: inherit;
  border: 1px solid #d3ccbf; border-radius: 10px; padding: 9px 12px; background: #fff;
}
input:focus, select:focus, textarea:focus, .btn:focus-visible, a:focus-visible, summary:focus-visible { outline: 3px solid #9ccbe0; outline-offset: 1px; }
input[type=checkbox] { width: auto; }
input[type=color] { padding: 2px; height: 40px; }
textarea { min-height: 110px; resize: vertical; }
.check { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; font-weight: 500; }
.form-error { color: var(--danger); font-weight: 600; margin: 4px 0 10px; }

/* Schalter Gruppenstatus */
.group-toggles { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); margin-bottom: 14px; }
.group-toggle { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-2); }
.group-toggle .name { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.seg { display: inline-flex; border: 1px solid var(--border); border-radius: 9px; overflow: hidden; }
.seg button { border: 0; background: #fff; padding: 6px 10px; font: inherit; font-size: .82rem; font-weight: 650; cursor: pointer; color: var(--muted); }
.seg button + button { border-left: 1px solid var(--border); }
.seg button.on.open { background: var(--ok); color: #fff; }
.seg button.on.closed { background: var(--closed); color: #fff; }

/* Tabellen & Listen */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .93rem; }
th, td { text-align: left; padding: 10px 10px; border-bottom: 1px solid var(--border); vertical-align: top; }
th { font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 700; }
tr:last-child td { border-bottom: 0; }
.list { list-style: none; margin: 0; padding: 0; }
.list > li { padding: 12px 0; border-bottom: 1px solid var(--border); }
.list > li:last-child { border-bottom: 0; }
.li-row { display: flex; align-items: center; gap: 10px; justify-content: space-between; flex-wrap: wrap; }
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: end; margin-bottom: 14px; }
.toolbar label.field { margin: 0; min-width: 160px; }

/* ---------- Login ---------- */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; background: radial-gradient(circle at 80% 0%, #fde9c3 0, transparent 40%), radial-gradient(circle at 0% 100%, #d7ecf3 0, transparent 45%), var(--bg); }
.auth-card { width: min(440px, 100%); }
.auth-brand { text-align: center; margin-bottom: 18px; }
.auth-brand img { width: 84px; height: 84px; }
.auth-brand h1 { margin: 8px 0 2px; }
.tabs { display: flex; gap: 4px; background: var(--surface-2); border: 1px solid var(--border); padding: 4px; border-radius: 12px; margin-bottom: 18px; }
.tabs button { flex: 1; border: 0; background: transparent; padding: 8px; border-radius: 9px; font: inherit; font-weight: 650; color: var(--muted); cursor: pointer; }
.tabs button.on { background: #fff; color: var(--text); box-shadow: var(--shadow); }

/* ---------- Elternportal ---------- */
.hero { display: flex; gap: 18px; align-items: center; background: linear-gradient(120deg, #fff6e5, #e6f2f7); border: 1px solid var(--border); border-radius: 18px; padding: 22px 24px; margin-bottom: 20px; }
.hero img { width: 64px; height: 64px; flex: none; }
.hero h1 { margin: 0 0 4px; }
.hero p { margin: 0; color: var(--muted); }
.tile-links { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.tile { display: flex; flex-direction: column; gap: 4px; padding: 16px; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; text-decoration: none; color: inherit; box-shadow: var(--shadow); transition: transform .12s; }
.tile:hover { transform: translateY(-2px); border-color: #c4dfec; }
.tile .ico { font-size: 1.6rem; }
.tile strong { color: var(--primary-strong); }
.tile span { font-size: .85rem; color: var(--muted); }
.highlight { border-left: 5px solid var(--accent); }
.highlight.pin { border-left-color: var(--sun); }
.highlight.event { border-left-color: var(--primary); }
.big-date { font-size: 1.35rem; font-weight: 750; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 4px 14px; font-size: .93rem; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }

/* ---------- Ausfallmanagement ---------- */
.day-tabs { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 18px; }
.day-tab { flex: none; text-align: left; border: 1px solid var(--border); background: var(--surface); border-radius: 14px; padding: 10px 14px; cursor: pointer; font: inherit; min-width: 170px; }
.day-tab:hover { border-color: #c4dfec; }
.day-tab.on { border-color: var(--primary); box-shadow: 0 0 0 2px var(--primary-soft); }
.day-tab strong { display: block; }
.day-tab .small { color: var(--muted); }

.status-banner { display: grid; gap: 16px; grid-template-columns: 1fr auto; align-items: center; padding: 18px 20px; border-radius: 16px; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow); margin-bottom: 18px; }
.status-banner .stats { display: flex; gap: 10px; }
.stat { min-width: 108px; text-align: center; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); }
.stat b { display: block; font-size: 1.6rem; line-height: 1.1; }
.stat span { font-size: .78rem; color: var(--muted); font-weight: 600; }
.stat.offer b { color: var(--ok); }
.stat.request b { color: var(--accent); }
.stat.match b { color: var(--primary); }
@media (max-width: 760px) { .status-banner { grid-template-columns: 1fr; } .status-banner .stats { flex-wrap: wrap; } }

.ausfall-layout { display: grid; gap: 20px; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); align-items: start; }
.ausfall-layout .side { position: sticky; top: 16px; display: flex; flex-direction: column; gap: 20px; }
@media (max-width: 1100px) { .ausfall-layout { grid-template-columns: 1fr; } .ausfall-layout .side { position: static; order: -1; } }

.family-actions { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); margin-bottom: 20px; }
.child-action { padding: 16px; border-radius: 14px; border: 1px solid var(--border); background: var(--surface); box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 8px; }
.child-action .who { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.05rem; }
.child-action .btn { align-self: flex-start; }

details.group { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow); overflow: hidden; }
details.group + details.group { margin-top: 10px; }
details.group > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 10px; padding: 13px 16px; border-left: 6px solid var(--c, #999); }
details.group > summary::-webkit-details-marker { display: none; }
details.group > summary .caret { margin-left: 2px; transition: transform .15s; color: var(--muted); }
details.group[open] > summary .caret { transform: rotate(90deg); }
details.group > summary .gname { font-weight: 700; }
details.group > summary .meta { margin-left: auto; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
details.group.closed > summary { background: repeating-linear-gradient(-45deg, #fff, #fff 10px, #fcf1ef 10px, #fcf1ef 20px); }
.children { list-style: none; margin: 0; padding: 4px 16px 14px 22px; columns: 2 220px; column-gap: 24px; }
.children li { break-inside: avoid; display: flex; align-items: center; gap: 8px; padding: 5px 0; border-bottom: 1px dashed #eee6da; font-size: .93rem; }
.children li .badge { margin-left: auto; }
.children li.own { font-weight: 700; }
.children li.gone { color: var(--muted); text-decoration: line-through; text-decoration-color: #c9c1b4; }
.children li.guest { color: var(--primary-strong); }
.subhead { padding: 4px 22px 0; font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; }

.panel { background: var(--surface); border: 2px solid var(--border); border-radius: 18px; box-shadow: var(--shadow); padding: 22px; }
.panel.entries { border-color: #c4dfec; }
.panel.swaps { border-color: #bfe3ca; }
.panel h2 { display: flex; align-items: center; gap: 10px; font-size: 1.3rem; }
.panel h2 .count { margin-left: auto; }
.section-label { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: .95rem; margin: 16px 0 8px; }
.section-label:first-of-type { margin-top: 4px; }

.entry { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; padding: 12px 14px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-2); }
.entry + .entry { margin-top: 8px; }
.entry .kind { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; font-size: 1.15rem; }
.entry .kind.offer { background: var(--ok-soft); }
.entry .kind.request { background: #fde6df; }
.entry .who { font-weight: 650; }
.entry .when { font-size: .8rem; color: var(--muted); }
.entry .right { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.entry.own { border-color: var(--primary); background: #f3f9fc; }
.entry.inactive { opacity: .7; }

.swap { display: grid; grid-template-columns: 1fr auto 1fr; gap: 12px; align-items: center; padding: 14px 16px; border-radius: 14px; background: linear-gradient(90deg, #fdf0ec, #eef8f1); border: 1px solid var(--border); }
.swap + .swap { margin-top: 10px; }
.swap .side-a, .swap .side-b { display: flex; flex-direction: column; gap: 4px; }
.swap .side-b { text-align: right; align-items: flex-end; }
.swap .arrow { font-size: 1.4rem; color: var(--primary); text-align: center; }
.swap .lbl { font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 700; }
.swap .nm { font-weight: 700; }
.swap .when { grid-column: 1 / -1; font-size: .8rem; color: var(--muted); text-align: center; margin-top: -4px; }
.swap.own { outline: 2px solid var(--primary); }
@media (max-width: 520px) { .swap { grid-template-columns: 1fr; } .swap .side-b { text-align: left; align-items: flex-start; } .swap .arrow { transform: rotate(90deg); } }

/* ---------- Schwarzes Brett ---------- */
.board { background: #c89b6d url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='6' height='6'%3E%3Ccircle cx='1' cy='1' r='.8' fill='%23000' opacity='.07'/%3E%3C/svg%3E"); border: 10px solid #8a5a33; border-radius: 16px; padding: 26px; display: grid; gap: 22px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); box-shadow: inset 0 2px 8px rgba(0,0,0,.25); }
.note { background: #fffbe6; padding: 22px 18px 16px; border-radius: 4px; box-shadow: 0 6px 14px rgba(0,0,0,.18); position: relative; transform: rotate(var(--r, -1deg)); }
.note:nth-child(3n+2) { background: #eaf6ff; --r: 1deg; }
.note:nth-child(3n) { background: #f0fbe9; --r: -.5deg; }
.note::before { content: ""; position: absolute; top: -8px; left: 50%; width: 18px; height: 18px; margin-left: -9px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #ff8a75, #c0392b); box-shadow: 0 2px 3px rgba(0,0,0,.3); }
.note h3 { margin-bottom: .4em; }
.note .body { white-space: pre-wrap; }
.note .meta { margin-top: 12px; font-size: .8rem; color: var(--muted); display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }

.message { padding: 18px 20px; }
.message .body { white-space: pre-wrap; margin-top: 6px; }
.message.pinned { border-left: 5px solid var(--sun); }
.message .meta { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; color: var(--muted); font-size: .85rem; }

/* ---------- Kalender ---------- */
.cal { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.cal-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; border-bottom: 1px solid var(--border); }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); }
.cal-grid .dow { font-size: .75rem; font-weight: 700; color: var(--muted); text-transform: uppercase; padding: 8px; text-align: center; background: var(--surface-2); border-bottom: 1px solid var(--border); }
.cal-day { min-height: 96px; border-right: 1px solid #efe9df; border-bottom: 1px solid #efe9df; padding: 6px; font-size: .82rem; }
.cal-day:nth-child(7n) { border-right: 0; }
.cal-day.other { background: #fbfaf7; color: #b3ab9e; }
.cal-day.today .num { background: var(--primary); color: #fff; border-radius: 999px; padding: 0 7px; }
.cal-day .num { font-weight: 700; display: inline-block; margin-bottom: 4px; }
.cal-ev { display: block; width: 100%; text-align: left; border: 0; font: inherit; font-size: .78rem; padding: 2px 6px; border-radius: 6px; margin-bottom: 3px; background: var(--primary-soft); color: var(--primary-strong); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; cursor: pointer; }
.cal-ev.shortage { background: var(--closed-soft); color: var(--closed); }
.cal-ev.absence { background: var(--warn-soft); color: var(--warn); }
@media (max-width: 700px) { .cal-day { min-height: 64px; padding: 3px; } .cal-ev { font-size: .68rem; padding: 1px 3px; } }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: .85rem; color: var(--muted); margin: 10px 0 0; }
.legend i { display: inline-block; width: 12px; height: 12px; border-radius: 4px; margin-right: 6px; vertical-align: -1px; }

/* ---------- Dialog & Toasts ---------- */
dialog { border: 0; border-radius: 18px; padding: 0; width: min(640px, calc(100vw - 24px)); box-shadow: 0 20px 60px rgba(0,0,0,.25); color: inherit; }
dialog::backdrop { background: rgba(36, 49, 58, .45); }
dialog .dlg-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--border); }
dialog .dlg-head h2 { margin: 0; }
dialog .dlg-body { padding: 20px; max-height: calc(100vh - 160px); overflow-y: auto; }
dialog .dlg-foot { display: flex; justify-content: flex-end; gap: 8px; padding-top: 6px; }
.code-display { font: 700 2rem/1.2 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .12em; text-align: center; padding: 18px; background: var(--surface-2); border: 2px dashed var(--primary); border-radius: 14px; margin: 10px 0 14px; user-select: all; }
code, .mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }

#toasts { position: fixed; right: 16px; bottom: 16px; display: flex; flex-direction: column; gap: 8px; z-index: 100; }
.toast { background: #24313a; color: #fff; padding: 12px 16px; border-radius: 12px; box-shadow: var(--shadow); max-width: 380px; animation: pop .2s; }
.toast.error { background: var(--danger); }
.toast.ok { background: var(--ok); }
@keyframes pop { from { transform: translateY(8px); opacity: 0; } }

/* ---------- Kommentare ---------- */
.comments-box { margin-top: 14px; border-top: 1px solid var(--border); padding-top: 10px; }
.comments-box > summary { cursor: pointer; font-weight: 650; color: var(--primary-strong); display: flex; gap: 8px; align-items: center; }
.comments { list-style: none; margin: 10px 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.comment { background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; padding: 10px 12px; }
.comment.kita { background: var(--primary-soft); border-color: #c4dfec; }
.comment.own { border-color: var(--primary); }
.comment-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.comment-head .btn { margin-left: auto; }
.comment-body { white-space: pre-wrap; margin-top: 2px; }
.comments-box form textarea { min-height: 64px; }

/* ---------- Listen-Editor, Kinderdaten ---------- */
.row-editor { display: flex; flex-direction: column; gap: 8px; margin-bottom: 8px; }
.row-editor-row { display: grid; grid-template-columns: repeat(var(--cols, 2), minmax(0, 1fr)) auto; gap: 8px; align-items: end; padding: 10px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-2); }
.row-editor-row label.field { margin: 0; }
.row-editor-row .remove { margin-bottom: 4px; }
@media (max-width: 700px) { .row-editor-row { grid-template-columns: 1fr; } .row-editor-row .remove { justify-self: end; } }
.form-section { margin: 18px 0 8px; padding-top: 12px; border-top: 1px solid var(--border); }
.child-card .card-head h2 { margin-bottom: 4px; }
.kv-wide { grid-template-columns: 160px 1fr; gap: 8px 16px; font-size: 1rem; }
table.contacts td, table.contacts th { padding: 8px 8px; }
.request-card.done { opacity: .8; }
table.diff th[scope], table.diff tbody th { text-transform: none; letter-spacing: 0; font-size: .9rem; color: var(--text); white-space: nowrap; }
table.diff td.old { background: #fdf3f1; }
table.diff td.new { background: #eef8f1; font-weight: 600; }
ul.plain { list-style: none; margin: 0; padding: 0; }
ul.plain li + li { margin-top: 4px; }
.nav a .badge { min-width: 22px; justify-content: center; }

/* ---------- Einrichtung ---------- */
.pre { white-space: pre-wrap; }
.facility-hero { display: grid; grid-template-columns: minmax(180px, 320px) 1fr; gap: 20px; align-items: center; }
.facility-hero h2 { font-size: 1.4rem; }
.facility-img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); }
.facility-img.placeholder { object-fit: contain; padding: 28px; }
.facility-hero.provider { grid-template-columns: minmax(120px, 200px) 1fr; }
.facility-hero.provider .facility-img { aspect-ratio: 1; object-fit: contain; background: #fff; }
@media (max-width: 640px) { .facility-hero, .facility-hero.provider { grid-template-columns: 1fr; } }
table.hours th { text-transform: none; letter-spacing: 0; font-size: 1rem; color: var(--text); font-weight: 600; }
.card.person { display: flex; gap: 14px; align-items: flex-start; }
.avatar { flex: none; width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; font-weight: 750; color: var(--primary-strong); background: linear-gradient(135deg, #fde9c3, #d7ecf3); }
.image-field { display: flex; gap: 14px; align-items: center; margin-bottom: 12px; flex-wrap: wrap; }
.img-preview { width: 140px; height: 105px; object-fit: cover; border-radius: 10px; border: 1px solid var(--border); background: var(--surface-2); }

/* ---------- Konto, Rechtstexte ---------- */
.link-btn { margin-top: 8px; padding-left: 0; }
.auth-foot { text-align: center; margin-top: 14px; }
.legal-links { color: var(--muted); margin-top: 10px; }
.legal-links a { color: var(--muted); }
.legal-page { place-items: start center; }
.legal-wrap { width: min(820px, 100%); padding: 24px 0; }
.legal-text { line-height: 1.6; }
.danger-text { color: var(--danger); }
.userbox .row { margin-top: 2px; }
.passkey-login { margin-top: 10px; }
.passkey-login .or { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: .85rem; margin: 6px 0 10px; }
.passkey-login .or::before, .passkey-login .or::after { content: ""; flex: 1; border-top: 1px solid var(--border); }
.passkey-btn { width: 100%; }
