/* Kita Hub – Design-System „süß“ (T-K4-0, D-1511-3). Mobil zuerst (375 px), alles lokal. */
@font-face {
  font-family: "Nunito"; font-style: normal; font-weight: 400; font-display: swap;
  src: url(/static/fonts/nunito-latin-400-normal.woff2) format("woff2");
}
@font-face {
  font-family: "Nunito"; font-style: normal; font-weight: 600; font-display: swap;
  src: url(/static/fonts/nunito-latin-600-normal.woff2) format("woff2");
}
@font-face {
  font-family: "Nunito"; font-style: normal; font-weight: 800; font-display: swap;
  src: url(/static/fonts/nunito-latin-800-normal.woff2) format("woff2");
}

:root {
  --bg: #FFF7F0;
  --card: #FFFFFF;
  --text: #4A2E2A;
  --muted: #7A5A52;
  --accent: #C0607A;          /* Rand „heute“, Deko, aktive Flächen */
  --accent-strong: #A3445E;   /* Text/Knöpfe auf Akzent: AA mit Weiß */
  --accent-soft: #FBE3EA;
  --line: #F1E2D8;
  --past-bg: #F3EEEA; --past-ink: #6B4F48; --past-line: #D9C6BB;  /* vergangene Tage */
  --unsure-line: #7A5A52;  /* gestrichelter Rahmen „unsicher“ (Kontrast >= 3:1, D-2311-5) */
  --shadow: 0 2px 10px rgba(74, 46, 42, 0.07);

  /* Farbe je Infoart: -bg Fläche, -fg Icon, -ink Text */
  --essen-bg: #E3F6EC; --essen-fg: #2E8B62; --essen-ink: #1F5E46;
  --schliesstag-bg: #FBE0E0; --schliesstag-fg: #8A2A2A; --schliesstag-ink: #8A2A2A;
  --frist-bg: #FFF1C9; --frist-line: #F2C94C; --frist-fg: #7A5A00; --frist-ink: #7A5A00;
  --buecherei-bg: #E7E3FB; --buecherei-fg: #3C3489; --buecherei-ink: #3C3489;
  --mfe-bg: #E7E3FB; --mfe-fg: #3C3489; --mfe-ink: #3C3489; /* = buecherei */
  --hasenschule-bg: #E7E3FB; --hasenschule-fg: #3C3489; --hasenschule-ink: #3C3489; /* = buecherei */
  --abweichung-bg: #DCEBFA; --abweichung-fg: #0C447C; --abweichung-ink: #0C447C;
  --zeitraum-bg: #BBD8F7; --zeitraum-fg: #08346B; --zeitraum-ink: #08346B;
  --bedarfsgruppe-bg: #D0F0F2; --bedarfsgruppe-fg: #0F5E66; --bedarfsgruppe-ink: #0F5E66;
  --fest-bg: #FFE9CC; --fest-fg: #7A4A06; --fest-ink: #7A4A06;
  --info-bg: #F3EEEA; --info-fg: #4A2E2A; --info-ink: #4A2E2A;
  --krankheit-bg: #FBE0E0; --krankheit-fg: #8A2A2A; --krankheit-ink: #8A2A2A; /* = schliesstag */
  --geburtstag-bg: #FFE9CC; --geburtstag-fg: #7A4A06; --geburtstag-ink: #7A4A06; /* = fest */

  --r-card: 20px;
  --r-chip: 18px;
  --r-pill: 16px;
  --nav-h: 78px;

  /* Kawaii-Icon-Palette (T-K4-11) */
  --ico-ink: #4A2E2A;
  --ico-pink: #F7C6D3;
  --ico-cheek: #F29CB4;
  --ico-mint: #BDEBD2;
  --ico-yellow: #FFE49E;
  --ico-blue: #C4E0FA;
  --ico-lilac: #DFD6FB;
  --ico-peach: #FFD2A6;
  --ico-cream: #FFFDFB;
  color-scheme: light;
}
.art-essen { --art-bg: var(--essen-bg); --art-fg: var(--essen-fg); --art-ink: var(--essen-ink); }
.art-schliesstag { --art-bg: var(--schliesstag-bg); --art-fg: var(--schliesstag-fg); --art-ink: var(--schliesstag-ink); }
.art-frist { --art-bg: var(--frist-bg); --art-fg: var(--frist-fg); --art-ink: var(--frist-ink); }
.art-buecherei { --art-bg: var(--buecherei-bg); --art-fg: var(--buecherei-fg); --art-ink: var(--buecherei-ink); }
.art-mfe { --art-bg: var(--mfe-bg); --art-fg: var(--mfe-fg); --art-ink: var(--mfe-ink); }
.art-hasenschule { --art-bg: var(--hasenschule-bg); --art-fg: var(--hasenschule-fg); --art-ink: var(--hasenschule-ink); }
.art-abweichung { --art-bg: var(--abweichung-bg); --art-fg: var(--abweichung-fg); --art-ink: var(--abweichung-ink); }
.art-zeitraum { --art-bg: var(--zeitraum-bg); --art-fg: var(--zeitraum-fg); --art-ink: var(--zeitraum-ink); }
.art-bedarfsgruppe { --art-bg: var(--bedarfsgruppe-bg); --art-fg: var(--bedarfsgruppe-fg); --art-ink: var(--bedarfsgruppe-ink); }
.art-fest { --art-bg: var(--fest-bg); --art-fg: var(--fest-fg); --art-ink: var(--fest-ink); }
.art-info { --art-bg: var(--info-bg); --art-fg: var(--info-fg); --art-ink: var(--info-ink); }
.art-krankheit { --art-bg: var(--krankheit-bg); --art-fg: var(--krankheit-fg); --art-ink: var(--krankheit-ink); }
.art-geburtstag { --art-bg: var(--geburtstag-bg); --art-fg: var(--geburtstag-fg); --art-ink: var(--geburtstag-ink); }
.art-none { --art-bg: var(--card); --art-fg: var(--muted); --art-ink: var(--text); }
.art-heute { --art-bg: var(--accent-soft); --art-ink: var(--accent-strong); }

*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
  overflow-x: clip;
  max-width: 100%;
}
body {
  margin: 0;
  max-width: 100%;
  background: var(--bg);
  color: var(--ico-ink, var(--text));
  font: 400 17px/1.45 "Nunito", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  overflow-wrap: anywhere;
  word-break: break-word;
}
img, svg, pre { max-width: 100%; }
pre { overflow-x: auto; }
.main, .card, .tiles > *, .tile, .tile-body, .tile-body > *,
.day-panels > *, .entries > *, .week-nav > *, .entry-detail, .tl-row, .tl-text,
.ed-text, .ed-hints li, .ed-hints span, .ed-sources li, .ed-sources a, .ed-sources span,
.src-dl dd, .memo-text, .row > span, .fee-label { min-width: 0; }
svg { flex: none; }
svg.kh-icon { width: 1.25em; height: 1.25em; vertical-align: -0.25em; }
svg.hase, svg.deko { vertical-align: middle; }  /* Größe über width/height-Attribut */
a { color: var(--accent-strong); }
h1, h2, strong { font-weight: 800; }
.sr-only {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; margin: -1px; padding: 0; border: 0;
}
:focus-visible { outline: 3px solid var(--accent-strong); outline-offset: 2px; }

/* Kopf: Hase + Begrüßung; Navigation am Handy unten */
.topbar {
  position: sticky; top: 0; z-index: 2;
  display: flex; align-items: center; gap: 12px;
  padding: 8px 14px; padding-top: max(8px, env(safe-area-inset-top));
  background: var(--bg); border-bottom: 2px solid var(--line);
}
.brand {
  display: flex; align-items: center; gap: 10px; margin-right: auto; flex-shrink: 0;
  color: var(--text); text-decoration: none; border-radius: var(--r-pill);
}
.brand-text { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.hello { font-weight: 800; font-size: 1.15em; white-space: nowrap; }
.brand-sub { font-size: 0.8em; color: var(--muted); font-weight: 600; }
.logout { display: flex; align-items: center; gap: 8px; margin: 0; flex-shrink: 1; min-width: 0; }
.who { font-size: 0.9em; color: var(--muted); font-weight: 600; white-space: nowrap; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.who-init { display: none; }
.logout button {
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
  width: 44px; height: 44px; border: 0; border-radius: 50%;
  background: var(--accent-soft); color: var(--accent-strong); cursor: pointer;
}
/* Handy: Leiste unten mit höchstens 5 Hauptpunkten, „Mehr“ ohne JS via <details> */
.nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 3;
  display: grid; grid-template-columns: repeat(5, 1fr);
  height: calc(var(--nav-h) + env(safe-area-inset-bottom));
  padding: 6px 6px env(safe-area-inset-bottom);
  background: var(--card); border-radius: var(--r-card) var(--r-card) 0 0;
  box-shadow: 0 -4px 16px rgba(74, 46, 42, 0.08);
}
.nav a, .nav-more > summary {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  color: var(--muted); text-decoration: none; font-size: 0.72em; font-weight: 600;
  text-align: center; border-radius: var(--r-pill); cursor: pointer; list-style: none;
}
.nav-more > summary::-webkit-details-marker { display: none; }
.nav-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 46px; height: 46px; border-radius: 50%; background: var(--info-bg);
}
.nav-icon svg { width: 30px; height: 30px; }
.nav a[aria-current="page"], .nav-more > summary.is-active { color: var(--accent-strong); font-weight: 800; }
.nav a[aria-current="page"] .nav-icon, .nav-more > summary.is-active .nav-icon { background: var(--accent-soft); }
.nav-more[open] > summary .nav-icon svg { transform: rotate(180deg); }
.nav-more-menu {
  position: absolute; right: 10px; bottom: calc(100% + 8px); z-index: 4;
  display: flex; flex-direction: column; gap: 4px; min-width: 200px; padding: 8px;
  background: var(--card); border-radius: var(--r-card);
  box-shadow: 0 8px 24px rgba(74, 46, 42, 0.16);
}
.nav-more-menu a {
  flex-direction: row; justify-content: flex-start; gap: 10px;
  padding: 6px 12px 6px 6px; font-size: 0.92em; text-align: left;
}
.nav-more-menu .nav-icon { width: 40px; height: 40px; }
.nav-more-menu .nav-icon svg { width: 24px; height: 24px; }

.main {
  max-width: 820px; margin: 0 auto;
  padding: 14px 12px calc(var(--nav-h) + 24px + env(safe-area-inset-bottom));
}
.page-title { font-size: 1.3em; margin: 4px 4px 12px; display: flex; align-items: center; gap: 8px; }
.section-title { font-size: 1.1em; margin: 0 0 10px; display: flex; align-items: center; gap: 8px; }
.hint { color: var(--muted); font-size: 0.92em; margin: 4px; }
.card {
  background: var(--card); border-radius: var(--r-card); padding: 16px;
  box-shadow: var(--shadow);
}

/* Pillen und Icon-Kreise */
.pill, .badge {
  display: inline-block; padding: 2px 11px; border-radius: var(--r-pill);
  background: var(--art-bg); color: var(--art-ink); font-size: 0.78em; font-weight: 800;
}
.icon-circle {
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  width: 54px; height: 54px; border-radius: 50%;
  background: var(--art-bg); color: var(--art-fg);
}
.icon-circle svg { width: 34px; height: 34px; }
.icon-circle.icon-white { background: #FFFFFF; }
/* .badge (Pille) und .row (Zeile mit Icon-Kreis) für einfache Seiten wie /status (T-K2-4):
   <span class="badge art-essen">ok</span>, <p class="row">{{ icon(...) }}<span>Text</span></p>.
   Ohne art-*-Klasse neutral (Info). */
:where(.badge, .row) { --art-bg: var(--info-bg); --art-fg: var(--info-fg); --art-ink: var(--info-ink); }
.badge { white-space: nowrap; }
.row {
  display: flex; align-items: center; gap: 12px; min-height: 52px; margin: 0; padding: 6px 2px;
  color: var(--text);
}
.row + .row { border-top: 1px dashed var(--line); }
.row > svg:first-child {
  width: 50px; height: 50px; padding: 9px; border-radius: 50%;
  background: var(--art-bg); color: var(--art-fg);
}

/* Tagesleiste Mo–Fr (D-2311-4, D-2311-6) */
.day-strip { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.chip {
  display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 0;
  padding: 8px 2px 9px; border-radius: var(--r-chip); border: 2px solid transparent;
  background: var(--art-bg); color: var(--art-ink); cursor: pointer; user-select: none;
  box-shadow: var(--shadow);
}
span.chip { cursor: default; }
.chip.art-none { border-color: var(--line); }
.chip-wd { font-weight: 800; font-size: 1.02em; line-height: 1.15; }
.chip-date { font-size: 0.78em; font-weight: 600; line-height: 1.2; white-space: nowrap; }
.chip-icon { display: flex; min-height: 28px; align-items: center; gap: 3px; color: var(--art-fg); }
.chip-icon svg { width: 24px; height: 24px; }
/* Mehrfach-Icons: genau 3 pro Zeile auf allen Breiten, dann Zeilenumbruch (D-2311-4) */
.chip-icons {
  --chip-ico: 16px;
  --chip-ico-gap: 2px;
  display: flex; flex-wrap: wrap; justify-content: center; align-content: flex-start;
  gap: var(--chip-ico-gap);
  max-width: calc(3 * var(--chip-ico) + 2 * var(--chip-ico-gap) + 1px);
  min-height: var(--chip-ico);
  margin-top: 2px;
}
.chip-ico {
  display: inline-flex; align-items: center; justify-content: center;
  flex: 0 0 var(--chip-ico); width: var(--chip-ico); height: var(--chip-ico);
  color: var(--art-fg);
}
.chip-ico svg { width: 100%; height: 100%; }
/* Heute-Kachel: kräftiger Rand (Kontrast >= 3:1) + kleines Label „Heute“ (D-2311-6) */
.chip.is-today { border: 3px solid var(--accent-strong); padding: 7px 1px 8px; }
.chip-today {
  margin-top: auto; padding: 1px 6px; border-radius: var(--r-pill);
  background: var(--accent-strong); color: #FFFFFF;
  font-size: 0.68em; font-weight: 800; line-height: 1.3; white-space: nowrap;
}
/* Vergangene Tage: gedämpfte Fläche + gestrichelter Rand statt Transparenz (Text bleibt AA) */
.chip.is-past {
  --art-bg: var(--past-bg); --art-ink: var(--past-ink);
  border: 2px dashed var(--past-line); box-shadow: none;
}

/* Tageskarten: Radio je Tag (im Chip), ohne JS genau eine Karte sichtbar */
.week { position: relative; }
fieldset.day-strip { border: 0; margin: 0; padding: 0; min-width: 0; }
.day-panels > .day-card { display: none; margin-top: 12px; }
.day-panels > .day-card.is-open { display: block; }  /* Rückfall ohne :has */
/* Ausgewählter Tag: angehoben + dunkler Ring, klar unterscheidbar von „Heute“ (D-2311-6) */
.chip:has(.day-pick:checked) {
  transform: translateY(-3px);
  box-shadow: 0 0 0 2px var(--text), 0 6px 14px rgba(74, 46, 42, 0.18);
}
.chip:has(.day-pick:focus-visible) { outline: 3px solid var(--accent-strong); outline-offset: 3px; }
@supports selector(:has(a)) {
  .day-panels > .day-card.is-open { display: none; }
  .week:has(.chip:nth-of-type(1) .day-pick:checked) .day-card:nth-child(1),
  .week:has(.chip:nth-of-type(2) .day-pick:checked) .day-card:nth-child(2),
  .week:has(.chip:nth-of-type(3) .day-pick:checked) .day-card:nth-child(3),
  .week:has(.chip:nth-of-type(4) .day-pick:checked) .day-card:nth-child(4),
  .week:has(.chip:nth-of-type(5) .day-pick:checked) .day-card:nth-child(5) { display: block; }
}

.day-card { position: relative; }
.day-card.is-today { box-shadow: 0 0 0 3px var(--accent-soft), var(--shadow); }
.day-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 12px; }
.day-title { font-size: 1.15em; margin: 0; margin-right: auto; }
.day-date { color: var(--muted); font-weight: 600; }
.closed {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px;
  border-radius: var(--r-chip); background: var(--art-bg); color: var(--art-ink);
}
.closed p { margin: 0; }

/* Eintragszeilen */
.entries { display: grid; margin-top: 6px; }
.entry {
  display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 6px 2px;
  color: var(--text); text-decoration: none; border-radius: var(--r-pill);
}
.entries .entry + .entry { border-top: 1px dashed var(--line); }
.entry-text { display: flex; flex-direction: column; min-width: 0; }
.entry-title { font-weight: 600; }
.entry-meta { font-size: 0.86em; color: var(--muted); }
.chev { margin-left: auto; color: var(--muted); display: flex; }
.stack { display: grid; gap: 6px; }

/* Merkzettel (Frist) */
.memo {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0 0 14px; padding: 12px 14px;
  border: 2.5px dashed var(--frist-line); border-radius: var(--r-card);
  background: var(--frist-bg); color: var(--frist-ink);
}
.memo-text { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.memo-title { overflow-wrap: anywhere; min-width: 0; }
.memo .chev { color: var(--frist-ink); flex-shrink: 0; }
.ack-form { margin-top: 6px; }
.btn-ack {
  border: 1.5px solid var(--frist-line); background: #fff; color: var(--frist-ink);
  border-radius: 999px; padding: 6px 12px; font: inherit; font-size: 0.84em; font-weight: 800;
  cursor: pointer; min-height: 34px;
}
.btn-ack-undo { border-color: var(--line); color: var(--muted); }

/* Leerzustand */
.empty { text-align: center; padding: 24px 16px; }
.empty-art { position: relative; display: inline-block; }
.empty-title { font-weight: 800; font-size: 1.1em; margin: 8px 0 2px; }
.deko-a { position: absolute; top: 6px; left: -14px; }
.deko-b { position: absolute; top: 26px; right: -14px; }

/* Login und Formulare */
.login { max-width: 380px; margin: 4vh auto 0; }
.login-art { position: relative; display: flex; justify-content: center; margin-bottom: -10px; }
.login-art .deko-a { left: 22%; top: 18px; }
.login-art .deko-b { right: 22%; top: 40px; }
.login .card { padding: 22px 20px; }
.login h1 { font-size: 1.5em; margin: 0; text-align: center; }
.login .hint { text-align: center; margin-bottom: 12px; }
.login form { display: grid; gap: 6px; }
.login label { font-size: 0.9em; font-weight: 600; color: var(--muted); margin-top: 6px; }
.login input {
  font: inherit; color: var(--text); padding: 12px 14px; width: 100%;
  border: 2px solid var(--line); border-radius: var(--r-pill); background: var(--bg);
}
.login input:focus { border-color: var(--accent); outline: none; }
.login button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  margin-top: 14px; padding: 12px; font: inherit; font-weight: 800;
  border: 0; border-radius: var(--r-pill); background: var(--accent-strong); color: #FFFDFB;
  cursor: pointer;
}
.login button svg.kh-icon, .form button svg.kh-icon {
  --ico-yellow: #843149; --ico-blue: #843149; --ico-cream: #843149; --ico-cheek: #E88AA5;
}
.error {
  color: var(--schliesstag-ink); background: var(--schliesstag-bg);
  padding: 8px 12px; border-radius: 14px; font-weight: 600;
}

/* Wochenplan (T-K4-1, D-1511-12): Navigation ohne JS */
.week-nav { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 8px; margin: 0 0 12px; }
.wn-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 4px; min-height: 44px;
  padding: 6px 12px; border-radius: var(--r-pill); background: var(--card); box-shadow: var(--shadow);
  color: var(--text); font-weight: 800; font-size: 0.9em; text-decoration: none;
}
.wn-btn[rel="prev"] svg { transform: scaleX(-1); }
.wn-today { background: var(--accent-soft); color: var(--accent-strong); }
.wn-today[aria-current="page"] { background: var(--card); color: var(--muted); }

/* Kacheln: 1 Zeile mit Icon, Klick erweitert inline (<details>) */
.tiles { display: grid; gap: 8px; }
.tile { border-radius: var(--r-chip); background: var(--art-bg); color: var(--art-ink); }
.tile > summary {
  display: flex; align-items: center; gap: 12px; min-height: 68px; padding: 7px 12px;
  list-style: none; cursor: pointer; border-radius: var(--r-chip);
}
.tile > summary::-webkit-details-marker { display: none; }
.tile-text { display: flex; align-items: baseline; gap: 8px; min-width: 0; flex: 1; }
.tile-label { flex: none; font-size: 0.74em; font-weight: 800; letter-spacing: 0.02em; }
.tile-label:only-child { flex: 0 1 auto; min-width: 0; font-size: 0.94em; }
.tile-line { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile-chev { display: flex; color: var(--art-fg); }
.tile[open] > summary .tile-chev { transform: rotate(180deg); }
.tile-body {
  margin: 0 8px 8px; padding: 10px 12px; border-radius: 14px; background: var(--card);
  color: var(--text); display: grid; gap: 10px;
}

.entry-detail + .entry-detail { border-top: 1px dashed var(--line); padding-top: 10px; }
.entry-detail p { margin: 0 0 4px; }
.ed-title { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; min-width: 0; }
.ed-title > * { min-width: 0; }
.ed-title-link { color: inherit; text-decoration: none; }
.ed-title-link:hover, .ed-title-link:focus-visible { text-decoration: underline; }
.ed-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 0.9em; }
.ed-time { font-weight: 800; display: inline-flex; align-items: center; gap: 4px; }
.ed-text { font-size: 0.95em; white-space: pre-line; }
.ed-ai-summary {
  padding: 10px 12px; border-radius: 12px; background: var(--bg);
  border: 1px solid var(--line); display: grid; gap: 4px; min-width: 0;
}
.ed-ai-head {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 6px; margin: 0; font-size: 0.9em; min-width: 0;
}
.ed-replaced s { color: var(--muted); }
.ed-source-text { display: grid; gap: 4px; min-width: 0; }
.ed-source-text + .ed-source-text { border-top: 1px dashed var(--line); padding-top: 8px; }
.ed-source-text .entry-meta { display: flex; align-items: center; gap: 4px; margin: 0; }
.ed-source-text .entry-meta svg { width: 14px; height: 14px; flex: none; }
.ed-hints, .ed-sources { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 4px; }
.src-toggle { margin-top: 4px; }
.src-toggle > summary { cursor: pointer; font-size: 0.78em; color: var(--muted); list-style: none; }
.src-toggle > summary::-webkit-details-marker { display: none; }
.ed-hints li { display: flex; gap: 6px; font-size: 0.9em; }
.ed-sources a { display: flex; gap: 6px; font-size: 0.86em; font-weight: 600; }
.ed-hints svg, .ed-sources svg { width: 16px; height: 16px; margin-top: 3px; }

/* Zeitleiste: Linie links, Abweichungen hervorgehoben, Extras eingerückt (gestaffelt) */
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline::before {
  content: ""; position: absolute; left: 93px; top: 8px; bottom: 8px; width: 2px;
  background: var(--line);
}
.tl-row { display: grid; grid-template-columns: 80px 20px minmax(0, 1fr); gap: 0 8px; align-items: start; padding: 4px 0; }
.tl-time { font-size: 0.8em; font-weight: 800; color: var(--muted); text-align: right; padding-top: 2px; white-space: nowrap; }
.tl-dot {
  position: relative; z-index: 1; display: flex; align-items: center; justify-content: center;
  width: 12px; height: 12px; margin: 5px 0 0 4px; border-radius: 50%;
  background: var(--card); border: 2px solid var(--past-line);
}
.tl-text { display: flex; flex-direction: column; min-width: 0; }
.tl-label { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; max-width: 100%; }
.tl-title { min-width: 0; }
.tl-ico, .tl-unsure-ico { display: inline-flex; align-items: center; flex: none; color: var(--art-fg); }
.tl-ico svg.kh-icon, .tl-unsure-ico svg.kh-icon { width: 18px; height: 18px; vertical-align: middle; }
.tl-note { font-size: 0.84em; color: var(--muted); }
.tl-menu { color: var(--essen-ink); }
.tl-row.is-dev .tl-text { padding: 4px 10px; border-radius: 12px; background: var(--art-bg); color: var(--art-ink); }
.tl-row.is-dev .tl-note { color: inherit; }
.tl-row.is-dev .tl-dot { border-color: var(--art-fg); background: var(--art-fg); }
.tl-row.tl-wochenpunkt.is-dev .tl-dot { background: var(--card); }
.tl-row.is-dropped .tl-label, .tl-row.is-dropped .tl-title { text-decoration: line-through; }
.tl-row.is-dropped .tl-text { --art-bg: var(--past-bg); --art-ink: var(--past-ink); --art-fg: var(--past-ink); }
.tl-row.is-dropped .tl-dot { background: var(--card); border-style: dashed; border-color: var(--past-line); }

/* Quell-Detailseite (T-K4-4) */
.src-meta, .src-items, .src-text { margin-bottom: 14px; }
.src-dl { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 12px; margin: 0; }
.src-dl dt { font-weight: 800; color: var(--muted); font-size: 0.9em; }
.src-dl dd { margin: 0; }
.src-versions { margin-top: 10px; }
.src-versions summary { cursor: pointer; font-weight: 600; color: var(--accent-strong); }
.src-item { padding: 8px 0; scroll-margin-top: 90px; }
.src-item + .src-item { border-top: 1px dashed var(--line); }
.src-item:target { background: var(--accent-soft); border-radius: 12px; padding: 8px; }
.src-item p { margin: 0 0 4px; }
.src-ref { font-size: 0.9em; display: flex; flex-direction: column; gap: 2px; }
.src-original {
  white-space: pre-wrap; overflow-wrap: anywhere; font-size: 0.92em; max-height: 70vh; overflow: auto;
  padding: 10px 12px; border-radius: 14px; background: var(--bg);
}

/* Zahnrad (Stammdaten) in der Kopfzeile, wie der Abmelde-Knopf */
.gear {
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--info-bg); color: var(--info-fg);
}
.gear[aria-current="page"] { background: var(--accent-soft); color: var(--accent-strong); }

/* Formulare (Stammdaten, Krankmelde-Helfer) */
.form { display: flex; flex-direction: column; gap: 14px; }
.form fieldset { border: 0; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.form legend { font-weight: 800; font-size: 1.05em; margin-bottom: 4px; padding: 0; }
.form label { font-weight: 600; font-size: 0.92em; color: var(--muted); }
.form input, .form select, .form textarea {
  font: inherit; color: var(--text); min-height: 44px; padding: 6px 12px;
  border: 2px solid var(--line); border-radius: 14px; background: var(--bg);
}
.form textarea { width: 100%; box-sizing: border-box; resize: vertical; }
.form input:focus, .form select:focus, .form textarea:focus { border-color: var(--accent-strong); outline: none; }
.form button, .care-section form button {
  font: inherit; font-weight: 800; min-height: 44px; padding: 8px 20px; border: 0;
  border-radius: var(--r-pill); background: var(--accent-soft); color: var(--accent-strong);
  cursor: pointer; align-self: flex-start;
}
.form button[disabled] { background: var(--past-bg); color: var(--past-ink); cursor: default; }
.form button.btn-ghost {
  background: var(--card); color: var(--muted); border: 1px solid var(--line); font-weight: 700;
}
.req { font-size: 0.78em; font-weight: 800; color: var(--schliesstag-fg); margin-left: 4px; }
.badge-override { font-size: 0.78em; font-weight: 800; color: var(--accent-strong); margin-left: 4px; }
.school-entry-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.school-entry-row input { flex: 1 1 180px; min-width: 0; }
.booking-grid { display: grid; grid-template-columns: auto 1fr 1fr; gap: 6px 8px; align-items: center; }
.booking-grid input { min-width: 0; }
.bg-head { font-size: 0.85em; font-weight: 800; color: var(--muted); }
.form-errors { margin-bottom: 12px; background: var(--schliesstag-bg); color: var(--schliesstag-ink); }
.form-errors p, .form-errors ul { margin: 0 0 4px; }
.notice-ok { color: var(--essen-ink); font-weight: 600; }
.disclaimer { font-weight: 600; color: var(--schliesstag-ink); }

/* Betreuung (T-K5-7) */
.care-section { margin-bottom: 14px; }

/* Gebühren (T-K5-4) */
.card + .card { margin-top: 14px; }
.fee-lines, .fee-preview { list-style: none; margin: 0; padding: 0; }
.fee-lines li { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; }
.fee-lines li + li { border-top: 1px dashed var(--line); }
.fee-total { font-weight: 800; border-top: 2px solid var(--line) !important; }
.fee-amount { white-space: nowrap; font-variant-numeric: tabular-nums; font-weight: 600; }
.fee-note { color: var(--muted); font-size: 0.88em; }
.fee-preview > li { padding: 6px 0; }
.fee-preview > li + li { border-top: 1px dashed var(--line); }
.fee-preview > li > details > summary {
  display: flex; justify-content: space-between; gap: 12px; cursor: pointer;
  min-height: 36px; align-items: center; list-style: none;
}
.fee-preview > li > details > summary::-webkit-details-marker { display: none; }
.fee-preview li.is-change .fee-month { font-weight: 800; }
.fee-change { display: block; font-size: 0.88em; font-weight: 600; color: var(--frist-fg); }

/* Krankheiten (T-K5-5) */
.readmit { padding: 10px 12px; border-radius: 14px; background: var(--art-bg); color: var(--art-ink); }
.readmit + .readmit { margin-top: 8px; }
.readmit p { margin: 0 0 4px; }
.helper-form { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 8px; }
.helper-result { margin-top: 10px; }

/* Bewegung nur, wenn erwünscht: kleiner Hüpfer des Hasen beim Laden */
@media (prefers-reduced-motion: no-preference) {
  .hase-hop { animation: hase-hop 0.8s ease-out 0.15s 1 both; transform-origin: 50% 100%; }
  .chip { transition: transform 0.15s, box-shadow 0.15s; }
  .choice-box { transition: border-color 0.15s, background-color 0.15s; }
  @keyframes hase-hop {
    0%, 100% { transform: translateY(0); }
    35% { transform: translateY(-7px); }
    60% { transform: translateY(0); }
    78% { transform: translateY(-2px); }
  }
}

/* Breite Bildschirme: Navigation oben in der Kopfzeile */
/* Schmale Bildschirme: Benutzername als Initiale im Kreis, kein Umbruch */
@media (max-width: 480px), (min-width: 900px) and (max-width: 1060px) {
  .who { display: none; }
  .who-init {
    display: inline-flex; align-items: center; justify-content: center;
    width: 32px; height: 32px; border-radius: 50%;
    background: var(--info-bg); color: var(--info-fg);
    font-size: 0.85em; font-weight: 800; flex-shrink: 0;
  }
}

@media (max-width: 400px) {
  .topbar { gap: 6px; padding: 6px 10px; }
  .brand { gap: 6px; }
  .brand svg.hase { width: 34px; height: 34px; }
  .hello { font-size: 0.92em; }
  .brand-sub { display: none; }
  .who-init { width: 30px; height: 30px; font-size: 0.8em; }
  .gear, .logout button { width: 38px; height: 38px; }
}

@media (max-width: 360px) {
  .day-strip { gap: 4px; }
  .chip-date { font-size: 0.72em; }
  .chip-icons { --chip-ico: 14px; --chip-ico-gap: 2px; }
  .chip-today { padding: 1px 4px; font-size: 0.64em; }
}

@media (min-width: 480px) {
  .chip-icons { --chip-ico: 20px; --chip-ico-gap: 3px; }
}

@media (min-width: 900px) {
  .topbar { padding: 10px 24px; }
  .nav {
    position: static; display: flex; flex-wrap: wrap; gap: 4px; height: auto; padding: 0;
    background: none; box-shadow: none; border-radius: 0; min-width: 0;
  }
  .nav > a, .nav-more > summary { flex-direction: row; gap: 8px; padding: 4px 12px 4px 4px; font-size: 0.95em; }
  .nav a[aria-current="page"], .nav-more > summary.is-active { background: var(--accent-soft); }
  .nav-icon { width: 40px; height: 40px; }
  .nav-icon svg { width: 24px; height: 24px; }
  .nav-label { position: static; width: auto; height: auto; overflow: visible; clip: auto; }
  .nav-more { position: relative; }
  .nav-more-menu { top: calc(100% + 8px); bottom: auto; right: 0; }
  .main { padding: 20px 24px 40px; }
  .day-strip { gap: 10px; }
  .chip-icons { --chip-ico: 22px; --chip-ico-gap: 4px; }
}

.more-info { margin-top: 8px; border-top: 1px solid rgba(31, 41, 55, 0.08); padding-top: 6px; min-width: 0; }
.more-info > summary {
  cursor: pointer; font-size: 0.86em; font-weight: 700; color: var(--muted);
  list-style: none; display: inline-flex; align-items: center; gap: 4px;
}
.more-info > summary::-webkit-details-marker { display: none; }
.more-info > summary::before { content: "▸"; font-size: 0.9em; }
.more-info[open] > summary::before { content: "▾"; }
.more-info-body { margin-top: 6px; display: grid; gap: 6px; min-width: 0; }
.info-flag { font-size: 0.9em; color: var(--muted); font-weight: 700; }

/* Team & Geburtstage (T-K4-6 Teil B) */
.team-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.team-member {
  padding: 10px 12px; border-radius: var(--r-pill); background: var(--bg);
  border: 1px solid var(--line); display: grid; gap: 8px; min-width: 0;
}
.team-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; flex-wrap: wrap; min-width: 0; }
.team-main { display: grid; gap: 2px; min-width: 0; flex: 1 1 160px; }
.team-name { font-size: 1em; }
.team-role { font-size: 0.85em; color: var(--muted); font-weight: 600; }
.team-role s, .team-info s { color: var(--muted); }
.team-terms { font-weight: 600; color: var(--muted); }
.team-info { font-size: 0.8em; color: var(--muted); }
.team-bday { flex: none; white-space: nowrap; }
.team-bday-form { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; min-width: 0; }
.team-field input {
  width: 64px; min-width: 0; padding: 6px 8px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--card); color: var(--text); font: inherit; font-size: 0.9em;
}
.team-sep { font-weight: 800; color: var(--muted); }
.btn-small {
  padding: 6px 12px; border-radius: 999px; border: 0; cursor: pointer;
  background: var(--accent-strong); color: #fff; font: inherit; font-size: 0.85em; font-weight: 700;
}
.btn-small.btn-ghost {
  background: var(--card); color: var(--muted); border: 1px solid var(--line);
}
.team-err { margin: 0; font-size: 0.85em; }
.team-inactive { margin-top: 8px; }
.team-inactive .team-list { margin-top: 8px; }

/* Icon-Vorschau /design/icons (T-K4-11) */
.icon-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px;
}
.icon-card {
  display: grid; gap: 8px; justify-items: center; text-align: center; padding: 14px 10px;
  border-radius: var(--r-pill); background: var(--card); border: 1px solid var(--line);
}
.icon-sizes { display: flex; align-items: center; justify-content: center; gap: 14px; }
.icon-24 svg.kh-icon { width: 24px; height: 24px; }
.icon-48 svg.kh-icon { width: 48px; height: 48px; }
.icon-name { font-size: 0.8em; font-weight: 700; color: var(--muted); }

/* Betreuungsplanung Stufe C (T-K5-8, 360px-Mobilansicht) */
.plan-topbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 12px; }
.plan-years { display: flex; flex-wrap: wrap; gap: 6px; }
.plan-year-pill {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: var(--r-pill);
  background: var(--card); border: 1.5px solid var(--line); color: var(--text); text-decoration: none;
  font-weight: 700; font-size: 0.9em;
}
.plan-year-pill.is-active { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-strong); }
.plan-stats { display: flex; flex-wrap: wrap; gap: 6px; }
.plan-actions-row { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 10px; }
.plan-add summary { cursor: pointer; font-weight: 700; font-size: 0.9em; padding: 8px 0; }
.plan-add-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-end; margin-top: 6px; }
.plan-add-form label { display: grid; gap: 2px; font-size: 0.82em; font-weight: 700; color: var(--muted); }
.plan-add-form input {
  padding: 6px 8px; border: 1px solid var(--line); border-radius: 10px; font: inherit; max-width: 100%; box-sizing: border-box;
}
.plan-month { display: grid; gap: 8px; }
.plan-row {
  border-radius: 14px; padding: 10px; border: 1.5px solid var(--line); display: grid; gap: 6px;
  min-width: 0; max-width: 100%; box-sizing: border-box;
}
.plan-row.plan-ok, .plan-dot.plan-ok { background: var(--essen-bg); border-color: rgba(34, 139, 94, 0.25); }
.plan-row.plan-warn, .plan-dot.plan-warn { background: var(--frist-bg); border-color: rgba(202, 138, 4, 0.35); }
.plan-row.plan-gap, .plan-dot.plan-gap { background: var(--schliesstag-bg); border-color: rgba(220, 38, 38, 0.28); }
.plan-row.plan-aus { background: var(--past-bg); color: var(--past-ink); border-color: var(--line); }
.plan-delete { display: none; }
.plan-row.plan-aus .plan-delete { display: block; }
.plan-delete-btn { border: 1px solid var(--line); background: var(--card); color: var(--muted); border-radius: var(--r-pill); padding: 2px 10px; cursor: pointer; }
.plan-legend { margin: 8px 0 0; font-size: 0.82em; color: var(--muted); display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.plan-bg-summary { margin: 8px 0 0; font-size: 0.88em; color: var(--text); }
.plan-bg-tag {
  display: inline-block; padding: 1px 5px; border-radius: 6px; border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.72); color: var(--text); font-size: 0.72em; font-weight: 800;
  line-height: 1.2; letter-spacing: 0.02em; vertical-align: middle;
}
.plan-dot { display: inline-block; width: 12px; height: 12px; border-radius: 4px; border: 1.5px solid var(--line); vertical-align: middle; }
.plan-comment-dot { display: none; color: var(--muted); }
.plan-row.has-comment .plan-comment-dot { display: inline-flex; align-items: center; }
.plan-comment-dot svg.kh-icon { width: 14px; height: 14px; }
.plan-row-head { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; min-width: 0; }
.plan-date { font-size: 0.9em; white-space: nowrap; }
.plan-desc { font-weight: 700; font-size: 0.92em; flex: 1 1 10em; min-width: 0; overflow-wrap: break-word; }
.plan-badges { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.plan-klaeren-chip { position: relative; cursor: pointer; user-select: none; }
.plan-klaeren-chip input { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip-path: inset(50%); }
.plan-klaeren-chip input:checked + .badge { --art-bg: var(--frist-bg); --art-ink: var(--frist-ink); box-shadow: inset 0 0 0 1.5px var(--frist-line); }
.plan-klaeren-chip input:not(:checked) + .badge { --art-bg: var(--card); --art-ink: var(--muted); box-shadow: inset 0 0 0 1.5px var(--line); }
.plan-klaeren-chip input:focus-visible + .badge { outline: 2px solid var(--accent); outline-offset: 2px; }
.plan-save-state { font-size: 0.85em; font-weight: 800; color: var(--muted); }
.plan-save-state.is-saved { color: var(--essen-ink); }
.plan-save-state.is-error { color: var(--schliesstag-ink); }
.plan-row-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-width: 0; }
.plan-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.person-chip { position: relative; cursor: pointer; user-select: none; }
.person-chip input { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip-path: inset(50%); }
.person-chip > span {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-width: 48px; min-height: 48px;
  padding: 4px 12px; border-radius: var(--r-pill); background: var(--card); border: 2px solid var(--line);
  font-size: 0.95em; font-weight: 800; color: var(--muted);
}
.person-chip.has-icon > span { padding-left: 6px; }
.person-chip .hase-person { flex: none; border-radius: 50%; background: #fff; filter: saturate(0.4); }
.person-chip input:checked + span {
  background: var(--accent-strong); border-color: var(--accent-strong); color: #fff;
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.person-chip input:checked + span .hase-person { filter: none; }
.person-chip input:checked + span::after { content: "✓"; font-weight: 900; }
.person-chip input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.plan-ferien {
  padding: 5px 8px; border-radius: 10px; border: 1px solid var(--line); background: var(--card);
  color: var(--text); font: inherit; font-size: 0.84em; max-width: 100%; min-width: 0;
}
.plan-comment summary { cursor: pointer; font-size: 0.82em; color: var(--muted); overflow-wrap: anywhere; }
.plan-comment-body { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.plan-comment-body input {
  flex: 1; min-width: 140px; padding: 6px 8px; border-radius: 10px; border: 1px solid var(--line); font: inherit; font-size: 0.88em;
}
.plan-person-group-label { margin: 8px 0 4px; font-size: 0.88em; color: var(--muted); }
.plan-person-group-label:first-child { margin-top: 0; }
.plan-person-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: 0.9em; }
.plan-person-list li { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.plan-person-add { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.plan-person-add input { flex: 1; min-width: 140px; padding: 6px 8px; border-radius: 10px; border: 1px solid var(--line); font: inherit; }

/* Jahres-Kalenderübersicht & Monatsplanung + Bestätigung (T-K5-11) */
.plan-dot.plan-none, .plan-cal-dot.plan-none, .plan-cal-dot.plan-aus { background: #e5e7eb; border-color: #d1d5db; }
.plan-cal-dot.plan-ok { background: #228b5e; border-color: #166534; color: #fff; }
.plan-cal-dot.plan-warn { background: #facc15; border-color: #ca8a04; color: #422006; }
.plan-cal-dot.plan-gap { background: #fb7185; border-color: #e11d48; color: #4c0519; }
.plan-cal-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
@media (min-width: 640px) { .plan-cal-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 960px) { .plan-cal-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.plan-cal-card {
  display: grid; gap: 6px; padding: 10px; text-decoration: none; color: inherit;
  min-width: 0;
}
.plan-cal-card:hover { border-color: var(--accent); }
.plan-cal-head { display: flex; align-items: center; justify-content: space-between; gap: 4px; flex-wrap: wrap; }
.plan-cal-name { font-size: 0.94em; }
.plan-cal-gaps { font-size: 0.72em; padding: 1px 6px; }
.plan-cal-wd, .plan-cal-week { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 3px; text-align: center; }
.plan-cal-wd { font-size: 0.68em; font-weight: 700; color: var(--muted); }
.plan-cal-weeks { display: grid; gap: 3px; }
.plan-cal-dot {
  display: inline-flex; align-items: center; justify-content: center;
  width: 100%; max-width: 20px; aspect-ratio: 1; margin: 0 auto;
  border-radius: 4px; border: 1px solid transparent; box-sizing: border-box;
  font-size: 0.52rem; font-weight: 800; line-height: 1; letter-spacing: -0.03em;
}
.plan-cal-empty { display: block; width: 100%; max-width: 20px; aspect-ratio: 1; margin: 0 auto; }
.plan-month-nav { display: flex; flex-wrap: wrap; gap: 6px; }
.plan-row-form { display: grid; gap: 6px; min-width: 0; }
.plan-undo-details summary { cursor: pointer; font-size: 0.8em; color: var(--muted); }
.plan-undo-body { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 6px; font-size: 0.82em; color: var(--muted); }
.plan-next-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.plan-next-link { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; padding: 6px 8px; border-radius: 10px; border: 1px solid var(--line); color: inherit; text-decoration: none; font-size: 0.9em; }
.plan-next-link:hover { border-color: var(--accent); background: var(--accent-soft); }
.plan-next-date { white-space: nowrap; }
.plan-next-desc { flex: 1 1 140px; min-width: 0; overflow-wrap: anywhere; font-weight: 600; }
.plan-next-state { font-size: 0.82em; color: var(--muted); white-space: nowrap; }
.plan-next-reason { flex-basis: 100%; font-size: 0.82em; color: var(--muted); padding-left: 20px; }
.plan-reason { margin: 2px 0 0; font-size: 0.82em; color: var(--muted); }
.btn-ack:disabled { background: var(--bg); color: var(--muted); border-color: var(--line); cursor: not-allowed; }

/* NA-1c (Auftrag §3), D-2311-5: „unsicher“ = gestrichelter Rahmen (Kontrast >= 3:1) */
.tl-row.is-unsure .tl-text { border: 2px dashed var(--unsure-line); border-radius: 12px; padding: 2px 8px; }
.tl-entry > summary { cursor: pointer; list-style: none; }
.tl-entry > summary::-webkit-details-marker { display: none; }

/* D-1911-6: Häkchen „Nur Änderungen“ blendet unveränderte Ablaufpunkte und Erreichbarkeit aus */
.only-changes { display: flex; align-items: center; gap: 8px; margin: 8px 0; font-weight: 600; }
.week:has(#nur-aenderungen:checked) .is-plain { display: none; }
.tl-row.is-small .tl-label { font-size: 0.84em; font-weight: 500; color: var(--muted); }
.tl-reach { display: block; }
.child-switcher { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.inline-form { display: inline; margin: 0; }

/* Familienverwaltung & Einladungen (V2-FAMILIEN, D-0112-27) */
.field-group { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.field-hint { margin: 0; font-size: 0.84em; color: var(--muted); }
.login input[readonly] { background: var(--past-bg); color: var(--past-ink); }

.btn-primary, .btn-secondary, .btn-danger {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 44px; padding: 8px 18px; border-radius: var(--r-pill);
  font: inherit; font-weight: 800; font-size: 0.94em; text-decoration: none;
  cursor: pointer; border: 2px solid transparent; max-width: 100%;
}
.btn-primary, .form button.btn-primary {
  background: var(--accent-strong); color: #FFFDFB;
}
.btn-secondary, .form button.btn-secondary, .login button.btn-secondary {
  background: var(--card); color: var(--text); border: 2px solid var(--line);
}
.login button.btn-secondary { margin-top: 8px; }
.btn-secondary:hover { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-strong); }
.btn-danger, .form button.btn-danger {
  background: var(--schliesstag-bg); color: var(--schliesstag-ink); border-color: var(--schliesstag-ink);
}
.btn-whatsapp {
  background: var(--essen-bg); color: var(--essen-ink); border-color: rgba(46, 139, 98, 0.35);
}
.btn-whatsapp:hover { border-color: var(--essen-fg); background: var(--essen-bg); color: var(--essen-ink); }

.invite-box { border: 2px solid var(--essen-fg); }
.invite-field { margin: 10px 0; }
.invite-field input {
  width: 100%; font: inherit; font-size: 0.9em; color: var(--text);
  min-height: 44px; padding: 8px 12px; border: 2px solid var(--line);
  border-radius: 14px; background: var(--bg);
}
.invite-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.invite-copy-status { min-height: 1.2em; margin: 6px 4px 0; }

/* Auswahlkarten (Radio im Hub-Stil, kein nackter Radio-Kreis) */
.choice-list { display: grid; gap: 8px; border: 0; margin: 0; padding: 0; min-width: 0; }
.choice-list legend { font-weight: 800; font-size: 0.96em; color: var(--text); margin-bottom: 6px; padding: 0; }
.choice-card { position: relative; display: block; cursor: pointer; min-width: 0; }
.choice-card input {
  position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip-path: inset(50%);
}
.choice-box {
  display: flex; flex-direction: column; gap: 2px; padding: 12px 14px;
  border-radius: var(--r-pill); border: 2px solid var(--line); background: var(--bg);
  color: var(--text);
}
.choice-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.choice-title { font-weight: 800; font-size: 0.98em; color: var(--text); }
.choice-desc { font-size: 0.86em; font-weight: 400; color: var(--muted); }
.choice-mark {
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--past-line);
  background: var(--card); font-size: 0.8em; font-weight: 800; color: #FFFDFB;
}
.choice-card input:checked + .choice-box {
  border-color: var(--accent-strong); background: var(--accent-soft);
}
.choice-card input:checked + .choice-box .choice-title { color: var(--accent-strong); }
.choice-card input:checked + .choice-box .choice-mark {
  border-color: var(--accent-strong); background: var(--accent-strong);
}
.choice-card input:checked + .choice-box .choice-mark::after { content: "✓"; }
.choice-card input:focus-visible + .choice-box {
  outline: 3px solid var(--accent-strong); outline-offset: 2px;
}

/* Familien-Liste als Karten */
.fam-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.fam-sub-title { margin-top: 18px; }
.fam-card {
  padding: 14px; border-radius: var(--r-chip); background: var(--bg);
  border: 1.5px solid var(--line); display: grid; gap: 8px; min-width: 0;
}
.fam-card.is-own { border-color: var(--accent); background: #FFFDFB; }
.fam-card.is-paused { background: var(--past-bg); border-style: dashed; border-color: var(--past-line); }
.fam-head {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 6px 10px; min-width: 0;
}
.fam-title-wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-width: 0; }
.fam-name { font-size: 1.04em; overflow-wrap: anywhere; }
.fam-status { margin: 0; font-size: 0.9em; color: var(--muted); }

.fam-edit { border-top: 1px dashed var(--line); padding-top: 8px; min-width: 0; }
.fam-toggle {
  display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 6px 14px;
  border-radius: var(--r-pill); background: var(--card); border: 1.5px solid var(--line);
  color: var(--text); font-weight: 800; font-size: 0.9em; cursor: pointer; list-style: none;
}
.fam-toggle::-webkit-details-marker { display: none; }
.fam-toggle:hover { border-color: var(--accent); color: var(--accent-strong); }
.fam-edit[open] > .fam-toggle svg { transform: rotate(180deg); }
.fam-edit-body {
  margin-top: 12px; padding: 14px; border-radius: var(--r-pill);
  background: var(--card); border: 1px solid var(--line); display: grid; gap: 14px; min-width: 0;
}
.fam-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.fam-actions form { margin: 0; }
.fam-danger { border-top: 1px dashed var(--line); padding-top: 10px; }
.fam-danger-toggle {
  display: inline-flex; align-items: center; min-height: 36px; padding: 4px 10px;
  border-radius: var(--r-pill); color: var(--schliesstag-ink); font-weight: 700;
  font-size: 0.88em; cursor: pointer; list-style: none;
}
.fam-danger-toggle::-webkit-details-marker { display: none; }
.fam-danger-form { margin-top: 8px; }

/* Admin-Reiter Konten (V2-KONTEN, D-0212-1, D-0212-2) */
.konten-warn {
  padding: 10px 14px; border-radius: var(--r-pill);
  background: var(--frist-bg); color: var(--frist-ink); border: 1.5px dashed var(--frist-fg);
}
.konten-confirm { border: 2px solid var(--schliesstag-ink); }
.konten-gen-pw { margin: 8px 0 0; }
.konten-gen-pw code, .pw-plain {
  display: inline-block; padding: 4px 10px; border-radius: 10px;
  background: var(--card); border: 1.5px solid var(--line);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.94em;
  overflow-wrap: anywhere; user-select: all;
}
.konten-user-list {
  list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 8px;
}
.konten-user-row {
  padding: 10px 12px; border-radius: var(--r-pill);
  background: var(--card); border: 1px solid var(--line); display: grid; gap: 8px; min-width: 0;
}
.konten-user-row.is-inactive { background: var(--past-bg); border-style: dashed; }
.konten-user-head {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px;
}
.konten-username { font-size: 0.98em; overflow-wrap: anywhere; }
.konten-meta {
  margin: 0; display: grid; gap: 4px; font-size: 0.9em;
}
.konten-meta > div { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; }
.konten-meta dt { color: var(--muted); font-weight: 700; min-width: 78px; }
.konten-meta dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.pw-reveal { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.pw-reveal-btn {
  display: inline-flex; align-items: center; min-height: 32px; padding: 2px 10px;
  border-radius: var(--r-pill); background: var(--bg); border: 1px solid var(--line);
  font-size: 0.86em; font-weight: 700; cursor: pointer; list-style: none;
}
.pw-reveal-btn::-webkit-details-marker { display: none; }
.pw-reveal-btn:hover { border-color: var(--accent); color: var(--accent-strong); }

/* Selbst-Registrierung: Warteliste, Mitmach-Link, QR & Turnstile (V2-REG2, D-0212-7) */
.wait-box { border: 2px solid var(--frist-fg); }
.fam-card.is-waiting { background: #FFFDFB; border-color: var(--frist-fg); }
.mitmach-intro { margin: 0; flex: 1 1 220px; }
.mitmach-qr-wrap {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  margin: 12px 0; padding: 14px; border-radius: var(--r-chip);
  background: #FFFFFF; border: 1.5px solid var(--line);
}
.mitmach-qr { display: block; width: min(220px, 100%); height: auto; border-radius: 8px; }
.turnstile-wrap { display: flex; justify-content: center; margin: 10px 0 4px; min-height: 65px; }

@media print {
  .topbar, .invite-actions, .fam-danger, .btn-primary, .btn-secondary { display: none !important; }
  .mitmach-qr-wrap { border: 1px solid #000; page-break-inside: avoid; }
  .mitmach-qr { width: 65mm; height: 65mm; }
}

/* iOS-Installationshinweis (D-0212-22): nur per pwa.js eingeblendet */
.ios-hint {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
  margin: 0 auto 12px; max-width: 560px; padding: 12px 14px;
  background: var(--accent-soft); color: var(--text);
  border: 1.5px solid var(--line); border-radius: var(--r-card); box-shadow: var(--shadow);
}
.ios-hint[hidden] { display: none; }
.ios-hint-text { margin: 0; flex: 1 1 220px; font-size: 0.92em; line-height: 1.45; }
.ios-share { display: inline-flex; vertical-align: -0.2em; color: var(--accent-strong); }
.ios-hint-ok {
  min-height: 44px; padding: 8px 18px; border: 0; border-radius: 999px; cursor: pointer;
  background: var(--accent-strong); color: #fff; font: inherit; font-weight: 800;
}
