/* Hof Tierisch verrückt – App-Stil (mobil zuerst) */
@font-face { font-family: "Inter"; font-weight: 400; font-display: swap; src: url("../fonts/inter-latin-400-normal.da03732a27e1.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 500; font-display: swap; src: url("../fonts/inter-latin-500-normal.51205681a1ba.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 600; font-display: swap; src: url("../fonts/inter-latin-600-normal.2ede57db1a3a.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 700; font-display: swap; src: url("../fonts/inter-latin-700-normal.8ca0a5155296.woff2") format("woff2"); }
@font-face { font-family: "Fraunces"; font-weight: 600; font-display: swap; src: url("../fonts/fraunces-latin-600-normal.b8dca52ca5f9.woff2") format("woff2"); }

:root {
  --bg: #F6F3EC;
  --card: #FFFFFF;
  --text: #1F2A24;
  --muted: #5B665F;
  --line: #E4DED2;
  --green: #2F5D46;
  --green-dark: #234836;
  --green-soft: #DCEBE2;
  --sky: #E6EEE0;
  --gold: #C39A45;
  --hay: #F2E2BD;
  --hay-text: #5A3F0A;
  --alert: #F6DDD5;
  --alert-text: #7A2A16;
  --brown: #7A5230;
  --radius: 16px;
  --nav-h: 68px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 16px/1.45 "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  padding-bottom: calc(var(--nav-h) + env(safe-area-inset-bottom) + 16px);
}
a { color: var(--green); }
img { max-width: 100%; display: block; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5rem; }
h1 { font-family: "Fraunces", Georgia, serif; font-weight: 600; font-size: 1.7rem; color: var(--green); }
h2 { font-size: 1.05rem; font-weight: 700; margin-top: 1.4rem; }
h3 { font-size: 1rem; font-weight: 600; }
p { margin: 0 0 .75rem; }
small, .muted { color: var(--muted); }
.wrap { max-width: 680px; margin: 0 auto; padding: 0 16px; }

/* Kopfzeile */
.topbar {
  position: sticky; top: 0; z-index: 20; background: rgba(246,243,236,.94);
  backdrop-filter: blur(8px); border-bottom: 1px solid var(--line);
  padding-top: env(safe-area-inset-top);
}
.topbar .wrap { display: flex; align-items: center; gap: 10px; height: 58px; }
.topbar .logo { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.topbar .logo img { width: 36px; height: 36px; }
.topbar .logo span { font-family: "Fraunces", Georgia, serif; font-weight: 600; font-size: 1.15rem; color: var(--green); }
.topbar .spacer { flex: 1; }
.avatar {
  width: 36px; height: 36px; border-radius: 50%; background: var(--green-soft); color: var(--green);
  display: grid; place-items: center; font-weight: 700; font-size: .85rem; text-decoration: none;
}
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 20px 0 12px; }
.page-head h1 { margin: 0; }
.back { display: inline-flex; align-items: center; gap: 4px; margin-top: 16px; text-decoration: none; font-weight: 600; font-size: .9rem; }

/* Karten & Listen */
.card { background: var(--card); border-radius: var(--radius); padding: 16px; margin-bottom: 12px; box-shadow: 0 1px 2px rgba(31,42,36,.06); }
.card.pinned { border-left: 4px solid var(--gold); }
.card h3 { margin-bottom: 4px; }
.card .meta { font-size: .82rem; color: var(--muted); margin-bottom: 8px; }
.card .body { white-space: pre-line; }
.card img.foto { border-radius: 12px; margin-top: 10px; }
.list { background: var(--card); border-radius: var(--radius); overflow: hidden; margin-bottom: 12px; box-shadow: 0 1px 2px rgba(31,42,36,.06); }
.list > a, .list > div.row, .list > form.row { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--line); text-decoration: none; color: inherit; }
.list > :last-child { border-bottom: 0; }
.list .grow { flex: 1; min-width: 0; }
.list .title { font-weight: 600; }
.list .sub { font-size: .85rem; color: var(--muted); }
.chev { color: var(--muted); }
.icon-round { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: var(--green-soft); color: var(--green); flex: none; font-weight: 700; }
.icon-round img { width: 42px; height: 42px; border-radius: 12px; object-fit: cover; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 12px; }
.stat { background: var(--card); border-radius: var(--radius); padding: 14px; text-decoration: none; color: inherit; box-shadow: 0 1px 2px rgba(31,42,36,.06); }
.stat b { display: block; font-size: 1.6rem; color: var(--green); line-height: 1.1; }
.stat span { font-size: .85rem; color: var(--muted); }
.empty { text-align: center; color: var(--muted); padding: 28px 12px; }

/* Chips & Badges */
.chip { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: .78rem; font-weight: 600; background: var(--green-soft); color: var(--green); white-space: nowrap; }
.chip.hay { background: var(--hay); color: var(--hay-text); }
.chip.alert { background: var(--alert); color: var(--alert-text); }
.chip.grey { background: #ECE8DF; color: var(--muted); }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--alert-text); display: inline-block; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: 0; border-radius: 12px; padding: 11px 16px; font: inherit; font-weight: 600;
  background: var(--green); color: #fff; text-decoration: none; cursor: pointer; min-height: 44px;
}
.btn:hover { background: var(--green-dark); }
.btn.sec { background: var(--green-soft); color: var(--green); }
.btn.ghost { background: transparent; color: var(--green); border: 1.5px solid var(--green-soft); }
.btn.warn { background: var(--alert); color: var(--alert-text); }
.btn.small { padding: 6px 12px; min-height: 34px; font-size: .88rem; border-radius: 10px; }
.btn.block { width: 100%; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; }
form.inline { display: inline; margin: 0; }

/* Segment-Tabs */
.tabs { display: flex; gap: 4px; background: #ECE8DF; padding: 4px; border-radius: 12px; margin: 4px 0 14px; overflow-x: auto; }
.tabs a { flex: 1; text-align: center; padding: 8px 10px; border-radius: 9px; text-decoration: none; color: var(--muted); font-weight: 600; font-size: .9rem; white-space: nowrap; }
.tabs a.on { background: #fff; color: var(--green); box-shadow: 0 1px 2px rgba(0,0,0,.08); }

/* Formulare */
.form p, .form .field { margin: 0 0 14px; }
.form label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: 5px; }
.form input[type=text], .form input[type=email], .form input[type=password], .form input[type=number],
.form input[type=date], .form input[type=time], .form input[type=datetime-local], .form input[type=tel],
.form select, .form textarea {
  width: 100%; font: inherit; padding: 11px 12px; border: 1.5px solid var(--line); border-radius: 12px; background: #fff; color: var(--text);
}
.form textarea { min-height: 110px; resize: vertical; }
.form input:focus, .form select:focus, .form textarea:focus { outline: none; border-color: var(--green); }
.form input[type=checkbox] { width: 20px; height: 20px; vertical-align: middle; margin-right: 6px; accent-color: var(--green); }
.form .helptext, .form .help { display: block; font-size: .8rem; color: var(--muted); margin-top: 4px; }
.form .errorlist { list-style: none; padding: 0; margin: 4px 0 0; color: var(--alert-text); font-size: .85rem; }
.form ul:not(.errorlist) { list-style: none; padding: 0; margin: 0; }
.form ul:not(.errorlist) li { margin: 4px 0; }
.form ul:not(.errorlist) li label { font-weight: 500; display: inline; }
.check label { display: inline !important; font-weight: 500 !important; }

/* Meldungen (Toasts) */
.messages { list-style: none; padding: 0; margin: 14px 0 0; }
.messages li { background: var(--green); color: #fff; padding: 12px 14px; border-radius: 12px; margin-bottom: 8px; font-weight: 500; }
.messages li.error, .messages li.warning { background: var(--alert); color: var(--alert-text); }

/* Dienste */
.week-nav { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.week-nav a { text-decoration: none; font-weight: 600; padding: 6px 10px; }
.day { margin-bottom: 14px; }
.day-head { font-weight: 700; font-size: .9rem; color: var(--muted); margin: 0 0 6px 4px; text-transform: uppercase; letter-spacing: .04em; }
.day-head.today { color: var(--green); }
.shift { background: #fff; border-radius: 14px; padding: 12px 14px; margin-bottom: 8px; box-shadow: 0 1px 2px rgba(31,42,36,.06); }
.shift.full { opacity: .92; }
.shift.mine { box-shadow: inset 4px 0 0 var(--green), 0 1px 2px rgba(31,42,36,.06); }
.shift.cancelled { opacity: .55; }
.shift-top { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.shift-top .time { font-size: .85rem; color: var(--muted); white-space: nowrap; }
.people { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.person { display: inline-flex; align-items: center; gap: 6px; background: var(--bg); border-radius: 999px; padding: 3px 10px 3px 3px; font-size: .85rem; }
.person i { width: 24px; height: 24px; border-radius: 50%; background: var(--green-soft); color: var(--green); font-style: normal; font-weight: 700; font-size: .7rem; display: grid; place-items: center; }
.person.swap { background: var(--hay); }
.slot-free { display: inline-flex; align-items: center; border: 1.5px dashed var(--line); border-radius: 999px; padding: 2px 10px; font-size: .82rem; color: var(--muted); }
.fair td, .fair th { padding: 8px 6px; text-align: left; border-bottom: 1px solid var(--line); font-size: .9rem; }
.fair { width: 100%; border-collapse: collapse; }
.fair .bar { height: 8px; background: var(--green-soft); border-radius: 4px; overflow: hidden; min-width: 60px; }
.fair .bar span { display: block; height: 100%; background: var(--green); }

/* Unterhaltung */
.bubble { background: #fff; border-radius: 14px; padding: 10px 14px; margin: 0 0 10px; max-width: 88%; box-shadow: 0 1px 2px rgba(31,42,36,.06); }
.bubble.me { margin-left: auto; background: var(--green-soft); }
.bubble .meta { font-size: .75rem; color: var(--muted); margin-bottom: 2px; }
.bubble .body { white-space: pre-line; }

/* Untere Navigation */
.bottom-nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; background: #fff; border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom);
}
.bottom-nav .wrap { display: flex; height: var(--nav-h); padding: 0 4px; }
.bottom-nav a { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; text-decoration: none; color: var(--muted); font-size: .72rem; font-weight: 600; position: relative; }
.bottom-nav a svg { width: 24px; height: 24px; }
.bottom-nav a.on { color: var(--green); }
.bottom-nav a .badge { position: absolute; top: 9px; left: 50%; margin-left: 6px; background: var(--alert-text); color: #fff; border-radius: 999px; font-size: .65rem; min-width: 17px; height: 17px; display: grid; place-items: center; padding: 0 4px; }
.fab { position: fixed; right: 18px; bottom: calc(var(--nav-h) + env(safe-area-inset-bottom) + 18px); z-index: 25; width: 56px; height: 56px; border-radius: 18px; background: var(--green); color: #fff; display: grid; place-items: center; box-shadow: 0 6px 16px rgba(47,93,70,.35); text-decoration: none; font-size: 28px; }
@media (min-width: 720px) { .fab { right: calc(50% - 340px + 18px); } }

/* Login */
.login { min-height: 100vh; display: flex; flex-direction: column; justify-content: center; padding: 24px 0; }
.login .brand { text-align: center; margin-bottom: 24px; }
.login .brand img { width: 220px; margin: 0 auto; }
body.no-nav { padding-bottom: 0; }

.kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 14px; font-size: .95rem; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; white-space: pre-line; }
hr { border: 0; border-top: 1px solid var(--line); margin: 16px 0; }

/* ---------- Desktop-Ansicht ---------- */
.nav-logo { display: none !important; }
@media (min-width: 1024px) {
  :root { --side: 248px; }
  body { padding-bottom: 32px; padding-left: var(--side); }
  body.no-nav { padding-left: 0; }
  .wrap.wide { max-width: 1180px; padding: 0 32px; }
  .topbar .logo { display: none; }
  .bottom-nav { top: 0; right: auto; width: var(--side); border-top: 0; border-right: 1px solid var(--line); padding: 0; }
  .bottom-nav .wrap { flex-direction: column; height: 100%; padding: 20px 14px; gap: 4px; max-width: none; }
  .bottom-nav a.nav-logo { display: block !important; flex: none; padding: 6px 8px 22px; }
  .bottom-nav a.nav-logo img { width: 170px; }
  .bottom-nav a { flex: none; flex-direction: row; justify-content: flex-start; gap: 12px; padding: 11px 14px; border-radius: 12px; font-size: .95rem; }
  .bottom-nav a:hover { background: var(--bg); }
  .bottom-nav a.on { background: var(--green-soft); }
  .bottom-nav a .badge { position: static; margin-left: auto; }
  .fab { right: 32px; bottom: 32px; }
  h1 { font-size: 2rem; }
  .page-head { margin-top: 28px; }
  .grid2.stats { grid-template-columns: repeat(4, 1fr); }
  .dash { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 32px; align-items: start; }
  .dash-a > h2:first-child, .dash-b > .page-head:first-child { margin-top: 1.4rem; }
  .days { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 0 16px; align-items: start; }
  .card.form, form.card { max-width: 720px; }
  .list, .card { box-shadow: 0 1px 3px rgba(31,42,36,.07); }
  .bubble { max-width: 70%; }
  .login .wrap, .login { max-width: 440px; margin: 0 auto; }
}
@media (min-width: 1024px) and (max-width: 1199px) {
  .dash { grid-template-columns: 1fr; }
}

/* Datei-/Foto-Auswahl */
.form input[type=file] { width: 100%; font: inherit; padding: 10px; border: 1.5px dashed var(--green); border-radius: 12px; background: var(--green-soft); color: var(--green); }
.form input[type=file]::file-selector-button { font: inherit; font-weight: 600; border: 0; border-radius: 10px; background: var(--green); color: #fff; padding: 9px 14px; margin-right: 10px; cursor: pointer; }
.page-head .btn-row { justify-content: flex-end; }

/* Startseite: Mein Pferd */
.mein-pferd { padding: 16px; }
.mp-foto { width: 64px; height: 64px; border-radius: 18px; overflow: hidden; background: var(--green-soft); display: grid; place-items: center; flex: none; text-decoration: none; }
.mp-foto img { width: 100%; height: 100%; object-fit: cover; }
.mp-foto span { font-family: "Fraunces", Georgia, serif; font-size: 1.8rem; color: var(--green); }
.mp-titel { font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin: 14px 0 4px; }
.mp-zeile { display: block; padding: 8px 10px; border-radius: 10px; background: var(--bg); margin-top: 6px; font-size: .92rem; color: inherit; text-decoration: none; overflow: hidden; }
.mp-aktionen { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }

/* Foto-Feld mit Vorschau */
.foto-vorschau { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.foto-vorschau img { width: 96px; height: 96px; object-fit: cover; border-radius: 14px; }
.form .foto-weg { display: inline-flex !important; align-items: center; gap: 6px; font-weight: 600 !important; color: var(--alert-text); background: var(--alert); padding: 8px 12px; border-radius: 10px; cursor: pointer; }
.form .foto-weg input { margin: 0 !important; }

/* Pinnwand */
.tabs .zaehler { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--alert-text); color: #fff; font-size: .7rem; margin-left: 4px; }
.form label.zg-alle { background: var(--hay); color: var(--hay-text); border-radius: 8px; padding: 4px 8px; }

/* ---------- Hof-Aufgaben & Checklisten (v3.5) ---------- */
.icon-round.haken { border: 0; cursor: pointer; font-size: 1.1rem; }
.icon-round.haken.an { background: var(--green); color: #fff; }
.icon-round.haken.problem { background: var(--alert); color: var(--alert-text); }
.row.aufgabe.fertig .title { text-decoration: line-through; color: var(--muted); }
.notiz { font-size: .85rem; color: var(--alert-text); background: var(--alert); border-radius: 8px; padding: 4px 8px; margin-top: 4px; white-space: pre-line; }
.notiz small { color: var(--alert-text); opacity: .8; }
.notiz-btn { flex: none; width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; color: var(--muted); text-decoration: none; font-size: 1.2rem; font-weight: 700; background: #F1EEE6; }
.fortschritt { display: flex; align-items: center; gap: 12px; font-size: .88rem; color: var(--muted); margin: 0 0 12px; }
.fortschritt span { white-space: nowrap; }
.balken { flex: 1; height: 8px; border-radius: 999px; background: #E4DED2; overflow: hidden; min-width: 60px; }
.balken i { display: block; height: 100%; background: var(--green); border-radius: 999px; }
.wochentage, ul.wochentage { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; padding: 0; margin: 4px 0 0; }
.wochentage label { display: inline-flex; align-items: center; gap: 4px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 999px; background: #fff; font-weight: 600; }
.wochentage > div { display: contents; }
.punkt-neu { display: flex; gap: 8px; margin: 0 0 14px; }
.punkt-neu input { flex: 1; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; font: inherit; background: #fff; }
.list .sub .ok { color: var(--green); font-weight: 700; }

/* ---------- Team-Chat (v3.5) ---------- */
body.chat-seite { padding-bottom: calc(var(--nav-h) + env(safe-area-inset-bottom) + 84px); }
.chat-kopf { display: flex; align-items: center; gap: 10px; margin: 14px 0 4px; }
.chat-kopf .back { font-size: 1.6rem; line-height: 1; text-decoration: none; padding: 0 4px; }
.chat-kopf h1 { margin: 0; font-size: 1.45rem; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-mitglieder { font-size: .8rem; color: var(--muted); margin: 0 0 10px; }
.msg { display: flex; }
.msg.ich { justify-content: flex-end; }
.msg .bubble { margin: 0 0 6px; max-width: 85%; padding: 8px 12px 6px; }
.msg.weg .bubble { opacity: .7; }
.msg .zeit { display: flex; gap: 12px; justify-content: flex-end; align-items: center; font-size: .7rem; color: var(--muted); margin-top: 2px; }
.aktion { border: 0; background: none; color: var(--muted); font: inherit; font-size: .7rem; padding: 0; cursor: pointer; }
.aktion:hover { color: var(--green); }
.zitat { display: block; border-left: 3px solid var(--green); background: rgba(47,93,70,.07); border-radius: 6px; padding: 4px 8px; margin: 2px 0 6px; font-size: .82rem; text-decoration: none; color: var(--text); overflow: hidden; }
.zitat b { display: block; color: var(--green); font-size: .75rem; }
.zitat span { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-foto { border-radius: 10px; max-height: 320px; width: auto; margin: 2px 0 4px; }
.chat-tag { text-align: center; margin: 14px 0 10px; }
.chat-tag span { background: #ECE8DF; color: var(--muted); font-size: .75rem; font-weight: 600; padding: 3px 10px; border-radius: 999px; }
.chat-gelesen { text-align: right; font-size: .75rem; color: var(--muted); min-height: 1.1em; margin: -2px 2px 8px; }
.chat-eingabe { position: fixed; left: 0; right: 0; bottom: calc(var(--nav-h) + env(safe-area-inset-bottom)); z-index: 29; background: var(--bg); border-top: 1px solid var(--line); padding: 8px 12px; }
.chat-eingabe .zeile, .chat-extra { max-width: 680px; margin: 0 auto; display: flex; align-items: flex-end; gap: 8px; }
.chat-extra { align-items: center; margin-bottom: 6px; }
.chat-extra .zitat { flex: 1; margin: 0; min-width: 0; }
.chat-extra[hidden], .chat-extra [hidden] { display: none; }
.chat-eingabe textarea { flex: 1; resize: none; border: 1px solid var(--line); border-radius: 20px; padding: 10px 14px; font: inherit; max-height: 140px; background: #fff; min-width: 0; }
.foto-knopf { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 50%; background: #fff; border: 1px solid var(--line); cursor: pointer; font-size: 1.15rem; flex: none; }
.btn.senden { width: 44px; height: 44px; border-radius: 50%; padding: 0; flex: none; display: grid; place-items: center; }
.umfrage { min-width: 230px; }
.umfrage .frage { font-weight: 700; margin: 2px 0; }
.usub { font-size: .75rem; color: var(--muted); margin: 2px 0 6px; }
.option { display: grid; grid-template-columns: auto 1fr auto; gap: 3px 8px; align-items: center; padding: 7px 9px; border: 1px solid var(--line); border-radius: 10px; margin-bottom: 6px; background: #fff; cursor: pointer; font-size: .92rem; }
.option.zu { grid-template-columns: 1fr auto; cursor: default; }
.option.gewaehlt { border-color: var(--green); background: #F3F8F4; }
.option input { margin: 0; accent-color: var(--green); width: 17px; height: 17px; }
.option .obalken { grid-column: 1 / -1; height: 5px; background: #EEE9DF; border-radius: 999px; overflow: hidden; }
.option .obalken i { display: block; height: 100%; background: var(--gold); border-radius: 999px; }
.option .namen { grid-column: 1 / -1; font-size: .72rem; color: var(--muted); }
.linkknopf { border: 0; background: none; color: var(--green); font: inherit; font-size: .75rem; padding: 0; cursor: pointer; text-decoration: underline; }
.js-chat .ukn { display: none; }
@media (max-width: 400px) { .bottom-nav a { font-size: .66rem; } }
@media (min-width: 1024px) {
  body.chat-seite { padding-bottom: 110px; }
  .chat-eingabe { left: var(--side); bottom: 0; padding: 10px 32px; }
  .chat-eingabe .zeile, .chat-extra { max-width: 1116px; }
  .msg .bubble { max-width: 62%; }
}

/* ---------- Profilbilder (v3.6) ---------- */
.av { display: inline-grid; place-items: center; border-radius: 50%; flex: none; font-weight: 700; object-fit: cover; background: var(--green-soft); color: var(--green); line-height: 1; letter-spacing: .02em; }
img.av { background: #eee; }
.avatar-link { display: block; flex: none; text-decoration: none; border-radius: 50%; }
.meta.mit-av { display: flex; align-items: center; gap: 8px; }
.msg .chat-av { margin: 2px 8px 0 0; align-self: flex-start; }
.chat-mitglieder { display: flex; flex-wrap: wrap; gap: 6px; }
.chat-mitglieder .person { padding: 2px 9px 2px 2px; font-size: .78rem; }
.foto-feld .foto-vorschau img { max-height: 220px; width: auto; }

/* ---------- Protokolle (v3.8) ---------- */
.protokoll-kopf > div { margin-bottom: 2px; }
.card.top { padding: 14px 16px; }
.top-kopf { display: flex; align-items: center; gap: 10px; }
.top-kopf h3 { flex: 1; margin: 0; font-size: 1.05rem; }
.top-nr { flex: none; width: 28px; height: 28px; border-radius: 50%; background: var(--green); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: .85rem; }
.card.top .body { white-space: pre-line; margin-top: 6px; }
.beschluss { background: #EEF5F0; border-left: 3px solid var(--green); border-radius: 6px; padding: 7px 10px; margin-top: 8px; font-size: .93rem; }
.top-plus { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.top-plus details { flex: 0 0 auto; }
.top-plus details[open] { flex-basis: 100%; }
.top-plus summary { display: inline-block; cursor: pointer; color: var(--green); font-weight: 600; font-size: .88rem; padding: 4px 10px; border: 1px dashed var(--green); border-radius: 999px; list-style: none; }
.top-plus summary::-webkit-details-marker { display: none; }
.form.mini { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.form.mini textarea, .form.mini input, .form.mini select { width: 100%; padding: 9px 11px; border: 1px solid var(--line); border-radius: 10px; font: inherit; background: #fff; }
.form.mini .zwei { display: flex; gap: 8px; }
.form.mini .zwei > * { flex: 1; min-width: 0; }
.form.mini .btn { align-self: flex-start; }
@media (min-width: 700px) { .personen-wahl ul, .personen-wahl > div > div { columns: 2; } }

/* ---------- Hof-Kalender (v3.8) ---------- */
.kal-filter { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 10px; scrollbar-width: none; }
.kal-chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 999px; background: #fff; border: 1px solid var(--line); font-size: .8rem; font-weight: 600; color: var(--text); text-decoration: none; white-space: nowrap; }
.kal-chip i { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.kal-chip.aus { opacity: .45; background: transparent; }
.kal-chip.aus i { background: #bbb !important; }
.kal-chip.heute-knopf { background: var(--green); border-color: var(--green); color: #fff; }
.kal-tag { background: var(--card); border-radius: 14px; margin-bottom: 10px; padding: 8px 12px 6px; box-shadow: 0 1px 2px rgba(31,42,36,.06); }
.kal-tag.heute { outline: 2px solid var(--green); }
.kal-tag.vergangen { opacity: .7; }
.kal-tag-kopf { display: flex; align-items: center; gap: 8px; padding: 2px 0 6px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.kal-wt { font-weight: 800; color: var(--green); width: 26px; }
.kal-dat { font-weight: 600; color: var(--muted); }
.kal-plus { margin-left: auto; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; text-decoration: none; color: var(--green); background: var(--green-soft); font-weight: 700; }
.kal-e { display: flex; align-items: flex-start; gap: 10px; padding: 7px 0; text-decoration: none; color: inherit; border-bottom: 1px dashed #EEE9DF; }
.kal-e:last-child { border-bottom: 0; }
.kal-e > i { flex: none; width: 4px; align-self: stretch; border-radius: 4px; }
.kal-zeit { flex: none; width: 58px; font-size: .82rem; font-weight: 700; color: var(--muted); line-height: 1.25; }
.kal-zeit small { display: block; font-weight: 500; }
.kal-text { min-width: 0; }
.kal-text b { font-weight: 600; display: block; }
.kal-text small { display: block; color: var(--muted); font-size: .8rem; }
.kal-leer { color: #bbb; font-size: .85rem; padding: 4px 0 6px; }
.kal-monat { background: var(--card); border-radius: 14px; overflow: hidden; box-shadow: 0 1px 2px rgba(31,42,36,.06); }
.kal-mkopf, .kal-mzeile { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.kal-mkopf span { text-align: center; font-size: .75rem; font-weight: 700; color: var(--muted); padding: 6px 0; background: #F1EEE6; }
.kal-mtag { min-height: 74px; border-right: 1px solid var(--line); border-top: 1px solid var(--line); padding: 3px 3px 4px; overflow: hidden; }
.kal-mtag:nth-child(7n) { border-right: 0; }
.kal-mtag.fremd { background: #FAF8F3; }
.kal-mtag.fremd .kal-mnr { color: #bbb; }
.kal-mnr { display: inline-grid; place-items: center; min-width: 24px; height: 24px; border-radius: 50%; font-size: .8rem; font-weight: 700; color: var(--text); text-decoration: none; margin-bottom: 2px; }
.kal-mtag.heute .kal-mnr { background: var(--green); color: #fff; }
.kal-me { display: block; font-size: .7rem; line-height: 1.25; padding: 2px 4px; margin-bottom: 2px; border-radius: 4px; background: color-mix(in srgb, var(--f) 16%, white); border-left: 3px solid var(--f); color: var(--text); text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kal-mehr { font-size: .68rem; color: var(--muted); text-decoration: none; padding-left: 3px; }
@media (max-width: 700px) {
  .kal-mtag { min-height: 54px; text-align: center; }
  .kal-mnr { display: grid; margin: 0 auto 3px; }
  .kal-me { display: inline-block; width: 8px; height: 8px; padding: 0; margin: 0 1px; border: 0; border-radius: 50%; background: var(--f); }
  .kal-me-text { display: none; }
  .kal-mehr { display: none; }
}
@media (min-width: 1024px) {
  .kal-woche { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 0 12px; align-items: start; }
  .kal-mtag { min-height: 112px; }
  .kal-me { font-size: .74rem; }
}

/* Chat-Blase (v3.8) */
.chat-blase { position: fixed; right: 16px; bottom: calc(var(--nav-h) + env(safe-area-inset-bottom) + 16px); z-index: 26; width: 58px; height: 58px; border-radius: 50%; background: var(--green); color: #fff; display: grid; place-items: center; box-shadow: 0 6px 18px rgba(47,93,70,.38); text-decoration: none; }
.chat-blase svg { width: 28px; height: 28px; }
.chat-blase .badge { position: absolute; top: -2px; right: -2px; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; background: var(--alert-text); color: #fff; font-size: .75rem; font-weight: 700; display: grid; place-items: center; border: 2px solid var(--bg); }
@media (min-width: 720px) { .chat-blase { right: calc(50% - 340px + 16px); } }
@media (min-width: 1024px) { .chat-blase { right: 32px; bottom: 32px; } }

/* ---------- Einstellverträge (v4.0) ---------- */
.schritte { display: flex; gap: 6px; margin: 0 0 12px; }
.schritte span { flex: 1; text-align: center; font-size: .78rem; font-weight: 700; padding: 6px 4px; border-radius: 999px; background: #ECE8DF; color: var(--muted); }
.schritte span.an { background: var(--green); color: #fff; }
.schritte span.fertig { background: var(--green-soft); color: var(--green); }
.hinweis-box { background: var(--hay); color: var(--hay-text); border-radius: 12px; padding: 10px 12px; font-size: .88rem; margin: 6px 0 12px; }
.unterschrift-block { border: 2px dashed var(--line); border-radius: 14px; padding: 12px; margin: 12px 0; background: #FCFBF8; }
.unterschrift-feld { width: 100%; font: italic 600 1.35rem Georgia, serif; padding: 10px 12px; border: 0; border-bottom: 2px solid var(--green); background: transparent; margin-top: 4px; }
#zeichenflaeche { width: 100%; height: auto; aspect-ratio: 10 / 3; background: #fff; border: 1px solid var(--line); border-radius: 10px; touch-action: none; margin: 8px 0 6px; display: block; }
.pflicht { color: var(--alert-text); }
.ampel { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; vertical-align: middle; }
.ampel.gruen { background: #3E8E5A; } .ampel.gelb { background: #D9A532; } .ampel.rot { background: #C2502E; }
table.tabelle { width: 100%; border-collapse: collapse; background: var(--card); border-radius: 14px; overflow: hidden; font-size: .88rem; }
table.tabelle th, table.tabelle td { padding: 8px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
table.tabelle th { background: #F1EEE6; font-size: .78rem; color: var(--muted); }
.tabelle-wrap { overflow-x: auto; margin-bottom: 14px; }
table.kv { display: table; width: 100%; border-collapse: collapse; }
table.kv td { padding: 4px 10px 4px 0; vertical-align: top; }
table.kv td:first-child { color: var(--muted); white-space: nowrap; width: 1%; }
.vertrag-banner { display: block; background: var(--green); color: #fff; text-decoration: none; }
.vertrag-banner b { display: block; font-size: 1.02rem; margin-bottom: 2px; }
.vertrag-banner span { font-size: .88rem; opacity: .9; }
.rechtstext h2 { font-size: 1.02rem; margin: 16px 0 6px; }
.rechtstext ul { padding-left: 20px; } .rechtstext li { margin-bottom: 6px; }

/* ---- Einsteller-Akte ---- */
.akte-kopf { display: flex; gap: 14px; align-items: center; margin: 6px 0 10px; }
.akte-kopf .avatar { flex: none; }
.akte-knoepfe { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.rot { color: var(--alert-text, #B23A1E); }
.akte-zahlen .stat b.rot { color: var(--alert-text, #B23A1E); }
.personen-info { display: flex; flex-wrap: wrap; gap: 4px 10px; }

/* ---- E-Mail-Postfach ---- */
.post-ordner { display: flex; gap: 6px; overflow-x: auto; padding: 2px 0 10px; margin-bottom: 4px; scrollbar-width: none; }
.post-ordner::-webkit-scrollbar { display: none; }
.post-ordner a { flex: none; padding: 6px 12px; border-radius: 999px; background: var(--card, #fff); border: 1px solid var(--line); color: inherit; text-decoration: none; font-size: .86rem; white-space: nowrap; }
.post-ordner a.on { background: var(--green, #2E5B43); color: #fff; border-color: transparent; }
.post-ordner a b { background: var(--gold, #C39A45); color: #fff; border-radius: 999px; padding: 0 6px; font-size: .75rem; margin-left: 2px; }
.post-suche { display: flex; gap: 8px; margin-bottom: 10px; }
.post-suche input { flex: 1; min-width: 0; }
.post-liste a { align-items: center; }
.post-liste a.neu .title { font-weight: 800; }
.post-liste a.neu .post-betreff { color: inherit; font-weight: 600; }
.post-liste a.neu::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--gold, #C39A45); flex: none; margin-right: -4px; }
.post-av { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 50%; background: #E3ECE5; color: #2E5B43; font-weight: 700; flex: none; }
.post-zeile1 { display: flex; justify-content: space-between; gap: 8px; }
.post-zeile1 .title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.post-zeit { font-size: .78rem; color: var(--muted); white-space: nowrap; }
.post-betreff { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.post-titel { font-size: 1.35rem; margin: 4px 0 10px; overflow-wrap: anywhere; }
.post-kopf { display: grid; gap: 8px; }
.post-von { display: flex; gap: 10px; align-items: center; overflow-wrap: anywhere; }
.post-an { font-size: .85rem; color: var(--muted); overflow-wrap: anywhere; }
.post-kopf .chip { justify-self: start; text-decoration: none; }
.post-knoepfe { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; align-items: center; }
.post-knoepfe.unten { justify-content: space-between; }
.post-hinweis { font-size: .86rem; padding: 10px 14px; }
.post-anhaenge { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 10px; }
.post-anhaenge .chip { text-decoration: none; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.post-inhalt { padding: 10px; overflow: hidden; }
.post-inhalt iframe { width: 100%; border: 0; display: block; min-height: 120px; background: #fff; }
.post-verschieben select { max-width: 13em; }
.post-form textarea { font-family: inherit; }
.post-zusatz.versteckt { display: none; }
.post-gruppen, .post-vorschlaege { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.post-gruppen .chip, .post-vorschlaege .chip { border: 0; cursor: pointer; text-decoration: none; font: inherit; font-size: .8rem; }
.post-ordner-aktion { display: flex; gap: 6px; align-items: center; }
.post-ordner-aktion[open] { flex-wrap: wrap; }
.post-ordner-aktion summary { list-style: none; }
