/* Gestaltung nach dem Entwurf „Erinna Senior – Smartphone“ */

@font-face { font-family: "Atkinson Hyperlegible"; src: url("/rina/fonts/atkinson-hyperlegible-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Atkinson Hyperlegible"; src: url("/rina/fonts/atkinson-hyperlegible-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-display: swap; }

:root {
  --bg: #FFFFFF;
  --card: #FFFFFF;
  --text: #1B2333;
  --muted: #4A5266;
  --quiet: #6A7081;
  --petrol: #17675E;
  --petrol-dark: #0F4A43;
  --mint: #DCEFEA;
  --mint-soft: #E4F2EE;
  --mint-ring: #F0F7F5;
  --line: #DDE2E6;
  --line-soft: #ECEFF1;
  --sand: #F2F4F5;
  --warn-bg: #FBEBCF;
  --warn-text: #6B4100;
  --rot: #A8492A;
  --schatten: 0 0 0 1.5px #E6EAED, 0 4px 14px rgba(27, 35, 51, 0.05);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; height: 100%; }
body {
  margin: 0; min-height: 100%; background: var(--bg); color: var(--text);
  font-family: "Atkinson Hyperlegible", "Segoe UI", system-ui, sans-serif;
  font-size: 20px; line-height: 1.4; -webkit-tap-highlight-color: transparent;
}
button, input, textarea { font-family: inherit; }
button { cursor: pointer; }
button:focus-visible, a:focus-visible, input:focus-visible { outline: 3px solid var(--petrol-dark); outline-offset: 3px; }
[hidden] { display: none !important; }

/* ---------- Bildschirme ---------- */

.bildschirm {
  max-width: 480px; margin: 0 auto; min-height: 100vh; min-height: 100dvh;
  padding: calc(26px + env(safe-area-inset-top)) 20px calc(24px + env(safe-area-inset-bottom));
  display: flex; flex-direction: column; gap: 16px;
}
.bildschirm.petrol { background: var(--petrol); color: #fff; max-width: none; align-items: center; }
.bildschirm.petrol > * { width: 100%; max-width: 440px; }
.bildschirm.mint { background: var(--mint); max-width: none; }
.bildschirm.mint > * { width: 100%; max-width: 440px; margin-left: auto; margin-right: auto; }
.bildschirm.dunkel { background: #2A3140; color: #fff; max-width: none; }
body.petrol-bg { background: var(--petrol); }
body.mint-bg { background: var(--mint); }
body.dunkel-bg { background: #2A3140; }

.fuellen { flex: 1; }
h1 { margin: 0; font-size: 30px; line-height: 1.2; font-weight: 700; }
h2 { margin: 6px 0 0; font-size: 20px; font-weight: 700; color: var(--muted); }
p { margin: 0; }
.leise { color: var(--quiet); font-size: 16px; }
.mittel { color: var(--muted); font-size: 18px; }
.mitte { text-align: center; }

/* ---------- Knöpfe ---------- */

.knopf {
  min-height: 72px; border: 0; border-radius: 22px; background: var(--petrol); color: #fff;
  font-size: 23px; font-weight: 700; display: flex; align-items: center; justify-content: center; gap: 12px;
  padding: 10px 18px; text-decoration: none; width: 100%;
}
.knopf.rahmen { background: var(--card); color: var(--petrol); border: 3px solid var(--petrol); min-height: 62px; font-size: 20px; }
.knopf.weiss { background: var(--card); color: var(--petrol); }
.knopf.hell { background: transparent; color: #fff; border: 2px solid rgba(255, 255, 255, 0.5); min-height: 56px; font-size: 19px; }
.knopf.text { background: transparent; color: var(--petrol); min-height: 52px; font-size: 19px; }
.knopf.klein { min-height: 52px; font-size: 18px; border-radius: 16px; }
#brief-seiten-liste { margin: 4px 0; padding-left: 22px; }
#brief-seiten-liste li { padding: 5px 0; }
#brief-seiten-liste .knopf { display: inline-flex; width: auto; min-height: 44px; padding: 5px 10px; font-size: 16px; vertical-align: middle; }
.knopf.rot { background: var(--card); color: var(--rot); box-shadow: var(--schatten); }
.knopf:disabled { opacity: 0.6; cursor: wait; }
.zwei { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.angehoerigen-kacheln { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 14px; }
.angehoerigen-person { background: var(--card); border: 2px solid var(--line); box-shadow: var(--schatten); }
.angehoerigen-kachel { min-width: 0; min-height: 108px; padding: 12px 6px; border: 2px solid transparent; border-radius: 20px; color: var(--text); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; font-size: 18px; font-weight: 700; line-height: 1.2; text-align: center; overflow-wrap: anywhere; }
.angehoerigen-kachel svg { flex: none; }
.angehoerigen-kachel.blau { background: #EBEEFA; border-color: #D7DDF3; } .angehoerigen-kachel.blau svg { color: #3B4FB8; }
.angehoerigen-kachel.gelb { background: #FBF1DC; border-color: #F0DDAF; } .angehoerigen-kachel.gelb svg { color: #8A5A00; }
.angehoerigen-kachel.mint { background: #E6F3EF; border-color: #C9E5DC; } .angehoerigen-kachel.mint svg { color: var(--petrol); }
.angehoerigen-kachel.rost { background: #F9E9E1; border-color: #EBCDBF; } .angehoerigen-kachel.rost svg { color: var(--rot); }
.angehoerigen-kachel:active { transform: scale(.98); }
:root[data-theme="dark"] .angehoerigen-kachel { background: var(--sand); border-color: var(--line); color: var(--text); }

.zurueck {
  min-height: 52px; border: 0; border-radius: 16px; background: var(--card); color: var(--text);
  font-size: 18px; font-weight: 700; display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%;
}
.kopfzeile { display: flex; align-items: center; gap: 12px; }
.rund-zurueck {
  width: 52px; height: 52px; border-radius: 50%; border: 0; background: var(--card); color: var(--text);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}

/* ---------- Karten ---------- */

.karte { background: var(--card); border-radius: 22px; padding: 18px; display: flex; flex-direction: column; gap: 10px; box-shadow: var(--schatten); }
.karte.flach { box-shadow: none; }
.verwaltung-funktion { flex-direction: row; align-items: center; gap: 12px; min-height: 70px; padding: 10px 12px; }
.verwaltung-funktion strong { flex: 1; min-width: 0; font-size: 18px; line-height: 1.2; }
.verwaltung-funktion .knopf.rahmen { width: 88px; min-height: 48px; flex: none; border-width: 2px; border-radius: 15px; padding: 5px; font-size: 18px; }
.verwaltung-funktion .knopf.aktiv { background: var(--petrol); color: #fff; }
.karte .titel { font-size: 18px; color: var(--muted); }
.karte .gross { font-size: 22px; line-height: 1.4; }
.block-petrol { background: var(--petrol); color: #fff; border-radius: 22px; padding: 18px; display: flex; flex-direction: column; gap: 4px; }
.block-petrol .titel { font-size: 18px; color: var(--mint); }
.block-petrol .antwort { font-size: 30px; font-weight: 700; line-height: 1.2; }
.block-petrol .auftrag { font-size: 21px; line-height: 1.35; margin-top: 4px; }
.block-warn { background: var(--warn-bg); color: var(--warn-text); border-radius: 18px; padding: 14px 16px; font-size: 19px; font-weight: 700; line-height: 1.35; }
.chip-ok {
  display: flex; align-items: flex-start; gap: 10px; background: var(--mint-soft); color: var(--petrol-dark);
  border-radius: 16px; padding: 12px 14px; font-size: 17px; font-weight: 700; line-height: 1.35;
}
.chip-ok svg { flex-shrink: 0; margin-top: 2px; }
.hinweis-sand { background: var(--sand); border-radius: 18px; padding: 14px 16px; display: flex; flex-direction: column; gap: 6px; font-size: 17px; line-height: 1.45; color: #2E3648; }
.hinweis-sand b { font-size: 18px; color: var(--text); }

/* ---------- Startseite ---------- */

.start-kopf { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.start-kopf .datum { font-size: 16px; color: var(--quiet); }
.start-kopf .uhr { font-size: 26px; font-weight: 700; font-variant-numeric: tabular-nums; }
.naechstes {
  border: 0; text-align: left; color: var(--text); background: var(--card); border-radius: 20px; padding: 16px 16px 16px 18px;
  display: flex; align-items: center; gap: 14px; box-shadow: var(--schatten); width: 100%;
}
.naechstes .symbol { width: 46px; height: 46px; border-radius: 14px; background: #FBF0D9; color: var(--warn-text); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.naechstes .wann { font-size: 15px; color: var(--quiet); }
.naechstes .was { font-size: 21px; font-weight: 700; }
.mikro-bereich { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; min-height: 230px; }
.mikro {
  width: 128px; height: 128px; border-radius: 50%; border: 0; background: var(--petrol); color: #fff;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 0 0 12px var(--mint-soft), 0 0 0 26px var(--mint-ring), 0 14px 30px rgba(23, 103, 94, 0.3);
}
.mikro:active { transform: scale(0.97); }
.mikro-text { margin-top: 18px; font-size: 21px; font-weight: 700; }
.kacheln { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.kachel {
  min-height: 78px; border: 0; border-radius: 18px; background: var(--card); color: var(--text);
  display: flex; align-items: center; gap: 12px; padding: 0 14px; box-shadow: 0 1px 2px rgba(27,35,51,0.05), 0 6px 18px rgba(27,35,51,0.05);
  font-size: 17px; font-weight: 700; text-align: left;
}
.kachel .ic { width: 40px; height: 40px; border-radius: 12px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.ic.blau { background: #E8ECF8; color: #3B4FB8; }
.ic.rost { background: #F8E6DD; color: var(--rot); }
.ic.mint { background: var(--mint-soft); color: var(--petrol); }
.ic.gelb { background: #FBF0D9; color: #8A5A00; }
.ic.grau { background: var(--sand); color: var(--text); }

/* ---------- Gespräch ---------- */

.gespraech-mitte { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 26px; text-align: center; }
.kreis {
  width: 170px; height: 170px; border-radius: 50%; background: #fff; color: var(--petrol);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 0 0 22px rgba(255, 255, 255, 0.18), 0 0 0 46px rgba(255, 255, 255, 0.08);
  transition: transform 0.4s ease;
}
.kreis.hoert { animation: atmen 2.4s ease-in-out infinite; }
.kreis.spricht { animation: sprechen 0.9s ease-in-out infinite; }
@keyframes atmen { 50% { transform: scale(1.04); } }
@keyframes sprechen { 50% { transform: scale(1.08); } }
@media (prefers-reduced-motion: reduce) { .kreis.hoert, .kreis.spricht { animation: none; } }
.zustand { font-size: 26px; font-weight: 700; }
.gesagt { font-size: 22px; color: var(--mint); line-height: 1.35; min-height: 1.35em; }
.antwort-text { font-size: 24px; font-weight: 700; line-height: 1.35; }
.gespraech-chips { display: flex; flex-direction: column; gap: 8px; width: 100%; }
.gespraech-chips .chip-ok { background: rgba(255,255,255,0.14); color: #fff; }
.gespraech-karte { background: #fff; color: var(--text); border-radius: 20px; padding: 14px 16px; display: flex; align-items: center; gap: 12px; text-align: left; border: 0; width: 100%; }
.gespraech-karte span { flex: 1; font-size: 19px; font-weight: 700; }

.laeuft-leiste {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(16px + env(safe-area-inset-bottom));
  width: calc(100% - 32px); max-width: 440px; min-height: 60px; border: 0; border-radius: 20px;
  background: var(--petrol); color: #fff; font-size: 19px; font-weight: 700; display: flex; align-items: center; justify-content: center; gap: 10px;
  box-shadow: 0 10px 24px rgba(23, 103, 94, 0.35); z-index: 10;
}
.laeuft-leiste .punkt { width: 12px; height: 12px; border-radius: 50%; background: #9FE0D2; animation: atmen 1.6s infinite; }

/* ---------- Listen ---------- */

.zeile {
  display: flex; align-items: center; gap: 14px; background: var(--card); border-radius: 20px; padding: 14px 16px; min-height: 64px;
}
.zeile.erledigt { background: #E8E5DE; color: var(--muted); }
.zeile .zeit { font-size: 20px; font-weight: 700; width: 64px; font-variant-numeric: tabular-nums; flex-shrink: 0; }
.zeile .inhalt { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.zeile .haupt { font-size: 20px; font-weight: 700; overflow-wrap: anywhere; }
.zeile .neben { font-size: 16px; color: var(--muted); }
#ged-notizen .zeile { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 10px; row-gap: 4px; }
#ged-notizen .zeile .inhalt { grid-column: 1 / -1; }
#ged-notizen [data-ged-edit] { grid-column: 1; justify-self: end; width: auto; min-height: 44px; padding: 4px 10px; }
#ged-notizen .loeschen { grid-column: 2; min-height: 44px; }
.ged-edit-form { background: var(--card); border-radius: 20px; padding: 16px; margin-top: 8px; display: flex; flex-wrap: wrap; gap: 10px; }
.ged-edit-form label { width: 100%; font-size: 17px; font-weight: 700; }
.ged-edit-form textarea { display: block; box-sizing: border-box; width: 100%; min-height: 110px; margin-top: 8px; padding: 12px; border: 2px solid var(--line); border-radius: 12px; font-size: 19px; resize: vertical; }
.zeile-knopf { border: 0; text-align: left; color: var(--text); width: 100%; box-shadow: var(--schatten); }
.leer { background: var(--card); border-radius: 20px; padding: 18px; font-size: 19px; color: var(--muted); line-height: 1.45; }
.gekauft { flex-shrink: 0; min-height: 52px; min-width: 112px; border: 3px solid var(--petrol); border-radius: 16px; background: #fff; color: var(--petrol); font-size: 18px; font-weight: 700; }
.gekauft[data-bestaetigen="true"] { background: var(--petrol); color: #fff; }
.familie-einkauf-zeile .haupt { flex: 1; min-width: 0; }
.familie-einkauf-zeile .gekauft { min-width: 98px; min-height: 44px; font-size: 16px; }
.loeschen { flex-shrink: 0; min-height: 48px; border: 2px solid var(--line); border-radius: 14px; background: #fff; color: var(--rot); font-size: 16px; font-weight: 700; padding: 0 12px; }
.loeschen.sicher { background: var(--rot); border-color: var(--rot); color: #fff; }

.avatar { width: 58px; height: 58px; border-radius: 50%; color: #fff; display: flex; align-items: center; justify-content: center; font-size: 24px; font-weight: 700; flex-shrink: 0; }
.avatar.gross { width: 132px; height: 132px; font-size: 54px; }

/* ---------- Brief ---------- */

.mini-brief { width: 64px; height: 84px; border-radius: 8px; background: #F7F5F1; box-shadow: inset 0 0 0 1px var(--line); display: flex; flex-direction: column; gap: 5px; padding: 10px 8px; flex-shrink: 0; }
.mini-brief span { height: 3px; background: #D9D3CA; border-radius: 2px; }
.mini-brief span:first-child { width: 80%; background: #3B4FB8; }
.brief-foto { width: 100%; border-radius: 6px; box-shadow: 0 16px 34px rgba(0, 0, 0, 0.35); background: #fff; touch-action: pinch-zoom; }

/* ---------- Erinnerung ---------- */

.erinnerung-kopf { display: flex; align-items: center; gap: 12px; color: var(--petrol); font-size: 22px; font-weight: 700; }
.erinnerung-kopf .glocke { width: 48px; height: 48px; border-radius: 50%; background: var(--petrol); color: #fff; display: flex; align-items: center; justify-content: center; }
.erinnerung h1 { font-size: 38px; line-height: 1.12; }
.tablette-bild { height: 100px; border-radius: 18px; background: #E3E8F7; display: flex; align-items: center; justify-content: center; }
.tablette-bild span { width: 62px; height: 62px; border-radius: 50%; background: #fff; box-shadow: inset 0 0 0 3px #C9D1E8, 0 4px 10px rgba(27, 35, 51, 0.12); }

/* ---------- Formulare ---------- */

label.feld { display: flex; flex-direction: column; gap: 6px; font-size: 18px; font-weight: 700; }
.wetter-live-wahl { display: flex; align-items: center; gap: 12px; min-height: 48px; font-size: 18px; font-weight: 700; cursor: pointer; }
.wetter-live-wahl input { width: 24px; height: 24px; flex: none; accent-color: var(--petrol); }
.eingabe {
  width: 100%; min-height: 60px; border: 2px solid #D9D3CA; border-radius: 16px; background: #fff; padding: 12px 16px;
  font-size: 21px; color: var(--text);
}
.eingabe:focus { border-color: var(--petrol); outline: none; }
.fortschritt { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.fortschritt span { height: 6px; border-radius: 3px; background: var(--line); }
.fortschritt span.an { background: var(--petrol); }
.wahl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.wahl button { min-height: 64px; border: 3px solid var(--line); border-radius: 18px; background: #fff; font-size: 20px; font-weight: 700; color: var(--text); }
.wahl button[aria-pressed="true"] { border-color: var(--petrol); background: var(--mint-soft); color: var(--petrol-dark); }
.kontakt-zeile { display: flex; flex-direction: column; gap: 8px; background: #fff; border-radius: 18px; padding: 14px; }
.fehlertext { color: var(--rot); font-size: 18px; font-weight: 700; min-height: 1.3em; }
.trenner { height: 1px; background: var(--line-soft); margin: 4px 0; }
.einstellung { display: flex; flex-direction: column; gap: 10px; }
.offline-status { color: var(--muted); font-size: 17px; }
#offline-inhalt { display: flex; flex-direction: column; gap: 16px; }
.offline-panel { display: flex; flex-direction: column; gap: 14px; padding: 18px; background: var(--sand); border-radius: 20px; }
details.offline-panel { display: block; }
details.offline-panel > * + * { margin-top: 14px; }
.offline-panel h2 { margin: 0; color: var(--text); font-size: 22px; }
.offline-panel .knopf { min-height: 60px; font-size: 20px; }
.offline-erfolg { padding: 14px 16px; border-radius: 14px; background: var(--mint); color: var(--petrol-dark); font-size: 19px; font-weight: 700; }
.offline-sync-wahl { display: flex; gap: 12px; align-items: flex-start; font-size: 17px; }
.offline-sync-wahl input { width: 24px; height: 24px; flex: none; accent-color: var(--petrol); }
#offline-sync-optionen summary { font-size: 19px; font-weight: 700; cursor: pointer; }
#offline-ergebnisse .karte { margin-top: 10px; }
.status-wert { font-size: 18px; color: var(--muted); }
.status-wert b { color: var(--text); }

.punkte { display: flex; gap: 10px; justify-content: center; }
.punkte span { width: 14px; height: 14px; border-radius: 50%; background: var(--petrol); animation: atmen 1.2s infinite; }
.punkte span:nth-child(2) { animation-delay: 0.2s; }
.punkte span:nth-child(3) { animation-delay: 0.4s; }

.meldung {
  position: fixed; left: 50%; transform: translateX(-50%); top: calc(16px + env(safe-area-inset-top));
  width: calc(100% - 32px); max-width: 440px; background: #1b2333; color: #fff; border-radius: 16px;
  padding: 14px 18px; font-size: 18px; font-weight: 700; z-index: 20; box-shadow: 0 10px 24px rgba(0,0,0,0.25);
}

/* ---------- Großer Foto-Knopf ---------- */

.foto-gross {
  width: 100%; min-height: 96px; border: 3px solid #E9C98A; border-radius: 24px; background: #FFF8EA; color: var(--text);
  display: flex; align-items: center; gap: 16px; padding: 14px 18px; text-align: left; box-shadow: var(--schatten);
}
.foto-gross:active { transform: scale(0.99); }
.foto-ic { width: 64px; height: 64px; border-radius: 18px; background: #F5DFAF; color: #7A4F00; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.foto-text { display: flex; flex-direction: column; gap: 2px; }
.foto-titel { font-size: 24px; font-weight: 700; line-height: 1.15; }
.foto-unter { font-size: 16px; color: var(--muted); }

/* ---------- Tippen ---------- */

.tippen-link {
  margin-top: 4px; min-height: 48px; border: 2px solid var(--line); border-radius: 16px; background: #fff; color: var(--petrol);
  font-size: 18px; font-weight: 700; display: inline-flex; align-items: center; gap: 10px; padding: 0 18px;
}
#s-tippen { padding-bottom: 0; }
#s-tippen .verlauf { flex: 1; display: flex; flex-direction: column; gap: 10px; padding-bottom: 8px; }
.blase { max-width: 88%; border-radius: 20px; padding: 12px 16px; font-size: 21px; line-height: 1.4; overflow-wrap: anywhere; }
.blase.ich { align-self: flex-end; background: var(--mint-soft); color: var(--petrol-dark); border-radius: 20px 6px 20px 20px; }
.blase.sie { align-self: flex-start; background: #fff; border-radius: 6px 20px 20px 20px; box-shadow: var(--schatten); }
.blase .wer { display: block; font-size: 15px; font-weight: 700; color: var(--petrol); margin-bottom: 2px; }
.blase .nochmal { margin-top: 8px; border: 0; background: none; color: var(--petrol); font-size: 16px; font-weight: 700; padding: 4px 0; min-height: 36px; }
.tippen-form {
  position: sticky; bottom: 0; background: var(--bg); padding: 10px 0 calc(16px + env(safe-area-inset-bottom));
  display: flex; flex-direction: column; gap: 10px; border-top: 1px solid var(--line-soft);
}
.tippen-form textarea { resize: none; min-height: 72px; line-height: 1.35; }
.tippen-diktieren { align-self: flex-start; width: auto; min-width: 140px; }
.tippen-diktat-status { margin: 0; font-size: 16px; line-height: 1.4; }
.tippen-diktat-hinweis { margin: 0; font-size: 14px; line-height: 1.4; color: var(--muted); }
.tippen-hilfe { display: flex; flex-direction: column; gap: 8px; }
.tippen-hilfe button { border: 2px solid var(--line); background: #fff; border-radius: 16px; min-height: 52px; font-size: 18px; text-align: left; padding: 8px 14px; color: var(--text); }

/* ---------- Version 3: Startseite, Kalender, Erinnerungen, Kontakte ---------- */

.naechstes .symbol { width: 50px; height: 50px; border-radius: 14px; background: var(--mint-soft); color: var(--petrol); }
.naechstes .was { font-size: 23px; line-height: 1.2; }
.naechstes .wann { font-size: 16px; }
.naechstes .mehr { font-size: 15px; font-weight: 700; color: var(--petrol); }
.naechstes.tablette .symbol { background: #FBF0D9; color: var(--warn-text); }
.mikro-bereich { min-height: 0; gap: 8px; }
.tippen-text { width: auto; min-height: 44px; font-size: 18px; margin-top: 2px; }

.kalender-karte { padding: 12px 12px 10px; gap: 6px; }
.monat-kopf { display: flex; align-items: center; justify-content: space-between; }
.monat-kopf span { font-size: 22px; font-weight: 700; }
.rund-pfeil { width: 52px; height: 52px; border-radius: 50%; border: 0; background: var(--sand); color: var(--text); display: flex; align-items: center; justify-content: center; }
.wochentage, .monat { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.wochentage { text-align: center; font-size: 14px; font-weight: 700; color: var(--quiet); }
.monat { row-gap: 2px; }
.tag { height: 50px; border: 0; background: none; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; padding: 0; color: var(--text); }
.tag:disabled { cursor: default; }
.tag .zahl { width: 40px; height: 36px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 19px; }
.tag.vergangen .zahl { color: #9AA0AD; }
.tag.heute .zahl { box-shadow: inset 0 0 0 2.5px var(--petrol); font-weight: 700; }
.tag.gewaehlt .zahl { background: var(--petrol); color: #fff; font-weight: 700; }
.tag .punkte-reihe { display: flex; gap: 3px; height: 7px; }
.tag .punkte-reihe i { width: 7px; height: 7px; border-radius: 50%; }
.legende { display: flex; flex-wrap: wrap; gap: 6px 14px; justify-content: center; font-size: 13px; color: var(--muted); padding-top: 2px; }
.legende span { display: flex; align-items: center; gap: 5px; }
.legende i { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.heute-leiste { display: grid; grid-template-columns: 104px minmax(0, 1fr); gap: 10px; position: sticky; bottom: 0; padding: 8px 0 calc(4px + env(safe-area-inset-bottom)); background: var(--bg); }
.heute-leiste .knopf { min-height: 64px; font-size: 20px; white-space: nowrap; padding: 0 12px; gap: 8px; }
.zeile .art-punkt { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }

.wahl.drei { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.wahl.drei button { font-size: 17px; padding: 0 6px; }
.feld .wahl { margin-top: 2px; }

.kontakt-karte { background: var(--card); border-radius: 20px; padding: 14px 16px; display: flex; flex-direction: column; gap: 12px; box-shadow: var(--schatten); }
.kontakt-kopf { display: flex; align-items: center; gap: 14px; }
.kontakt-knoepfe { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.kontakt-knoepfe .knopf { min-height: 56px; font-size: 19px; border-radius: 16px; padding: 0 10px; gap: 8px; }

.er-zeile { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line-soft); }
.er-zeile:first-child { border-top: 0; }
.er-zeile .inhalt { flex: 1; display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.er-zeile .wann { font-size: 15px; color: var(--quiet); }
.er-zeile .was { font-size: 19px; font-weight: 700; overflow-wrap: anywhere; }
#er-demnaechst .er-zeile { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; }
#er-demnaechst .er-zeile .inhalt { min-width: 0; }
#er-demnaechst .er-detail { min-width: 0; }
#er-demnaechst .er-detail summary { display: flex; flex-direction: column; gap: 2px; cursor: pointer; }
#er-demnaechst .er-detail summary::marker { color: var(--petrol); }
#er-demnaechst .er-detail .er-mehr { font-size: 14px; color: var(--petrol); font-weight: 700; }
#er-demnaechst .er-detail .er-volltext, #er-demnaechst .er-detail .er-schliessen { display: none; }
#er-demnaechst .er-detail[open] .er-vorschau, #er-demnaechst .er-detail[open] .er-oeffnen { display: none; }
#er-demnaechst .er-detail[open] .er-volltext, #er-demnaechst .er-detail[open] .er-schliessen { display: block; }
#er-demnaechst .er-detail[open] .er-volltext { white-space: pre-wrap; line-height: 1.5; }
#er-demnaechst .er-zeile [data-er-loeschen], #er-demnaechst .er-zeile [data-er-abbrechen] { width: auto; max-width: 170px; white-space: normal; justify-self: end; }
.zeile.faellig { box-shadow: inset 0 0 0 2px var(--petrol); }
.marke { font-size: 14px; font-weight: 700; color: var(--petrol-dark); background: var(--mint-soft); border-radius: 10px; padding: 4px 8px; flex-shrink: 0; }

.morgen-zeile { display: flex; gap: 12px; align-items: center; padding: 12px 0; border-top: 1px solid var(--line-soft); font-size: 19px; font-weight: 700; }
.morgen-zeile:first-child { border-top: 0; }
.morgen-zeile .zeit { width: 62px; flex-shrink: 0; }
.morgen-zeile.leise { color: var(--muted); font-weight: 400; }

/* Schriftgröße (Einstellungen) */
html.schrift-gross body { zoom: 1.12; }
html.schrift-sehrgross body { zoom: 1.25; }

#morgen-text { font-weight: 400 !important; font-size: 23px !important; }
.morgen-gruss { display: block; font-size: 34px; line-height: 1.15; font-weight: 700; margin-bottom: 12px; }
.knopf svg { flex-shrink: 0; }
.kachel { padding: 0 10px; gap: 10px; min-width: 0; }
.kachel .ic { width: 38px; height: 38px; }
@media (max-width: 380px) { .kachel { font-size: 16px; } }

/* ---------- Version 3.1: Weißer Hintergrund, Startseite „Variante D“ ---------- */

.bildschirm.start { padding: 0; gap: 0; }
.start-oben {
  background: var(--mint); border-radius: 0 0 32px 32px;
  padding: calc(22px + env(safe-area-inset-top)) 20px 22px; display: flex; flex-direction: column; gap: 14px;
}
.start-kopf { display: flex; flex-direction: column; gap: 2px; }
.start-zeile { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.start-kopf .datum { font-size: 17px; color: var(--petrol-dark); }
.start-kopf .uhr { font-size: 20px; font-weight: 700; color: var(--petrol-dark); font-variant-numeric: tabular-nums; }
.start-kopf h1 { font-size: 28px; }
.naechstes { background: #fff; box-shadow: none; padding: 12px 14px; gap: 12px; border-radius: 18px; }
.naechstes .zeit-box { width: 64px; flex-shrink: 0; display: flex; flex-direction: column; color: var(--petrol); font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1.1; }
.naechstes .zeit-box .klein { font-size: 14px; }
.naechstes .zeit-box .klein:empty { display: none; }
.naechstes .inhalt { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.naechstes .wann { font-size: 15px; color: var(--muted); }
.naechstes .was { font-size: 21px; line-height: 1.2; font-weight: 700; overflow-wrap: anywhere; }
.naechstes.tablette .zeit-box { color: var(--warn-text); }
.start-oben .mikro-bereich { flex: none; min-height: 0; gap: 0; padding-top: 18px; }
.start-oben .mikro { width: 128px; height: 128px; box-shadow: 0 0 0 10px rgba(255, 255, 255, 0.7), 0 12px 26px rgba(23, 103, 94, 0.3); }
.start-oben .mikro-text { margin-top: 22px; font-size: 22px; color: var(--petrol-dark); }
.start-oben .tippen-text {
  border: 0; background: none; min-height: 44px; padding: 0 12px; font-size: 17px; font-weight: 700;
  color: var(--petrol); text-decoration: underline; text-underline-offset: 4px;
}
.start-unten { flex: 1; padding: 16px 20px calc(10px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 10px; }
.start-unten .foto-gross { background: #fff; border: 2.5px solid #E2C27E; min-height: 74px; box-shadow: none; }
.start-unten .kachel {
  min-height: 100px; border-radius: 22px; box-shadow: none; padding: 8px;
  flex-direction: column; justify-content: center; gap: 8px; text-align: center; font-size: 19px;
}
.kachel.blau { background: #EBEEFA; } .kachel.blau svg { color: #3B4FB8; }
.kachel.gelb { background: #FBF1DC; } .kachel.gelb svg { color: #8A5A00; }
.kachel.mint { background: #E6F3EF; } .kachel.mint svg { color: var(--petrol); }
.kachel.rost { background: #F9E9E1; } .kachel.rost svg { color: var(--rot); }
.kachel:active, .foto-gross:active, .naechstes:active { transform: scale(0.98); }
.start-links { display: flex; justify-content: space-between; }
.start-links .knopf { width: auto; padding: 0 6px; }
.abend-start { min-height: 56px; width: 100%; }
.abend-frage { font-size: 24px; font-weight: 700; line-height: 1.35; }
.abend-merken { align-self: flex-start; width: auto; }
.abend-merken-status { margin: 0; font-size: 16px; line-height: 1.4; }
.abend-punkt { display: flex; gap: 12px; align-items: baseline; padding: 10px 0; border-bottom: 1px solid var(--line-soft); }
.abend-punkt:last-child { border-bottom: 0; }
.abend-punkt span { min-width: 76px; font-weight: 700; }
.abend-punkt strong { overflow-wrap: anywhere; }
.abend-punkt small { display: block; font-size: 14px; font-weight: 400; color: var(--muted); }
.abend-unklar { font-size: 17px; color: var(--muted); margin: 8px 0; }
.abend-dialog { display: flex; flex-direction: column; gap: 8px; }
.abend-dialog p { margin: 0; padding: 10px 14px; border-radius: 16px; }
.abend-dialog-ich { align-self: flex-end; background: var(--mint-soft); }
.abend-dialog-toni { align-self: flex-start; background: var(--card); box-shadow: var(--schatten); }
@media (max-width: 360px) { .start-unten .kachel { font-size: 17px; } }
.start-unten .foto-ic { width: 50px; height: 50px; border-radius: 14px; background: #F7E7C4; }
.start-unten .foto-titel { font-size: 21px; }
.start-unten .foto-unter { font-size: 15px; }
.start-kopf { align-items: stretch; }
.start-oben .mikro { width: 116px; height: 116px; }
.start-oben .mikro svg { width: 52px; height: 52px; }
.start-oben .mikro-bereich { padding-top: 14px; }
.start-oben .mikro-text { margin-top: 20px; }
.start-unten .kachel { min-height: 92px; }
.zeile, .leer { box-shadow: var(--schatten); }
.zeile.erledigt { background: #EEF0F2; box-shadow: none; }
.karte.flach .zeile, .karte .leer { box-shadow: none; }
.karte.flach { background: var(--sand); }
.bildschirm.mint .karte.flach, .bildschirm.petrol .karte.flach { background: #fff; }

/* Namensvorschläge in der Einrichtung */
.namen-chips { display: flex; flex-wrap: wrap; gap: 10px; }
.namen-chips button { min-height: 52px; padding: 0 20px; border: 3px solid var(--line); border-radius: 999px; background: #fff; font-size: 19px; font-weight: 700; color: var(--text); }
.namen-chips button[aria-pressed="true"] { border-color: var(--petrol); background: var(--mint-soft); color: var(--petrol-dark); }

/* Zwei ruhige Farbschemata nach dem ursprünglichen Memory Assistant. */
:root[data-theme="light"] {
  --bg: #ffffff;
  --card: #ffffff;
  --text: #1b2333;
  --muted: #4a5266;
  --quiet: #6a7081;
  --petrol: #17675e;
  --petrol-dark: #0f4a43;
  --mint: #dcefea;
  --mint-soft: #e4f2ee;
  --sand: #f2f4f5;
  --line: #dde2e6;
  --line-soft: #eceff1;
  --schatten: 0 0 0 1px #dde2e6, 0 3px 10px rgba(27, 35, 51, 0.04);
  color-scheme: light;
}
:root[data-theme="light"] .start-oben { background: #17675e; color: #ffffff; }
:root[data-theme="light"] .start-kopf .datum,
:root[data-theme="light"] .start-kopf .uhr,
:root[data-theme="light"] .start-oben .mikro-text,
:root[data-theme="light"] .start-oben .tippen-text { color: #ffffff; }
:root[data-theme="light"] .start-oben .mikro { background: #ffffff; color: #17675e; }
:root[data-theme="light"] .start-oben .naechstes { background: #ffffff; color: var(--text); }
:root[data-theme="light"] .start-unten .kachel { background: #ffffff; box-shadow: var(--schatten); }
:root[data-theme="light"] .karte.flach { background: #ffffff; box-shadow: var(--schatten); }
:root[data-theme="light"] .zeile,
:root[data-theme="light"] .kontakt-karte { background: #ffffff; }
:root[data-theme="light"] .ic.blau,
:root[data-theme="light"] .ic.gelb,
:root[data-theme="light"] .ic.mint,
:root[data-theme="light"] .ic.rost { background: var(--sand); }
:root[data-theme="light"] .kachel svg,
:root[data-theme="light"] .ic svg { color: var(--petrol); }
:root[data-theme="light"] .start-unten .foto-gross { border-color: var(--line); }
:root[data-theme="light"] .start-unten .foto-ic { background: var(--sand); color: var(--petrol); }

:root[data-theme="dark"] {
  --bg: #000000;
  --card: #111b19;
  --text: #f2f7f4;
  --muted: #c2d1ca;
  --quiet: #b4c5bd;
  --petrol: #4de2ca;
  --petrol-dark: #d2f5e8;
  --mint: #174f46;
  --mint-soft: #164840;
  --sand: #1b2a26;
  --line: #35564b;
  --line-soft: #294139;
  --warn-bg: #3b2a1b;
  --warn-text: #ffbf80;
  --rot: #f2827a;
  --schatten: 0 0 0 1px #35564b;
  color-scheme: dark;
}
:root[data-theme="dark"] .bildschirm.petrol,
:root[data-theme="dark"] .bildschirm.mint,
:root[data-theme="dark"] .bildschirm.dunkel,
:root[data-theme="dark"] body.petrol-bg,
:root[data-theme="dark"] body.mint-bg,
:root[data-theme="dark"] body.dunkel-bg { background: var(--bg); color: var(--text); }
:root[data-theme="dark"] .start-oben { background: var(--mint); }
:root[data-theme="dark"] .start-kopf .datum,
:root[data-theme="dark"] .start-kopf .uhr,
:root[data-theme="dark"] .start-oben .mikro-text { color: var(--text); }
:root[data-theme="dark"] .gesagt,
:root[data-theme="dark"] .block-petrol .titel { color: var(--muted); }
:root[data-theme="dark"] .knopf:not(.rahmen):not(.weiss):not(.hell):not(.text):not(.rot),
:root[data-theme="dark"] .mikro,
:root[data-theme="dark"] .laeuft-leiste { background: #17675e; color: #fff; }
:root[data-theme="dark"] .knopf.rahmen,
:root[data-theme="dark"] .knopf.weiss { color: var(--petrol); }
:root[data-theme="dark"] .verwaltung-funktion .knopf.aktiv { background: var(--petrol); border-color: var(--petrol); color: #082b25; }
:root[data-theme="dark"] .naechstes,
:root[data-theme="dark"] .gespraech-karte,
:root[data-theme="dark"] .blase.sie,
:root[data-theme="dark"] .kontakt-zeile,
:root[data-theme="dark"] .wahl button,
:root[data-theme="dark"] .eingabe,
:root[data-theme="dark"] .tippen-hilfe button,
:root[data-theme="dark"] .tippen-link,
:root[data-theme="dark"] .namen-chips button,
:root[data-theme="dark"] .gekauft,
:root[data-theme="dark"] .loeschen,
:root[data-theme="dark"] .bildschirm.mint .karte.flach,
:root[data-theme="dark"] .bildschirm.petrol .karte.flach { background: var(--card); color: var(--text); }
:root[data-theme="dark"] .kachel.blau,
:root[data-theme="dark"] .kachel.gelb,
:root[data-theme="dark"] .kachel.mint,
:root[data-theme="dark"] .kachel.rost,
:root[data-theme="dark"] .ic.blau,
:root[data-theme="dark"] .ic.gelb,
:root[data-theme="dark"] .ic.mint,
:root[data-theme="dark"] .ic.rost { background: var(--sand); }
:root[data-theme="dark"] .kachel svg,
:root[data-theme="dark"] .ic svg { color: var(--petrol); }
:root[data-theme="dark"] .start-unten .foto-gross { background: var(--card); border-color: var(--line); }
:root[data-theme="dark"] .start-unten .foto-ic,
:root[data-theme="dark"] .naechstes .symbol { background: var(--sand); color: var(--petrol); }
:root[data-theme="dark"] .hinweis-sand,
:root[data-theme="dark"] .zeile.erledigt { background: var(--sand); color: var(--muted); }
:root[data-theme="dark"] .blase.ich,
:root[data-theme="dark"] .wahl button[aria-pressed="true"],
:root[data-theme="dark"] .namen-chips button[aria-pressed="true"] { background: var(--mint-soft); color: var(--text); }
:root[data-theme="dark"] .loeschen { color: var(--rot); }
:root[data-theme="dark"] .gekauft[data-bestaetigen="true"] { background: var(--mint-soft); color: var(--text); }
:root[data-theme="dark"] .block-petrol { background: #174f46; }

/* Startseite: dieselben Wege, als ruhige und klar getrennte Aktionen. */
.start-oben { gap: 12px; padding-bottom: 24px; }
.start-oben .mikro-bereich { padding-top: 4px; }
.start-oben .mikro { width: 108px; height: 108px; }
.start-oben .mikro svg { width: 48px; height: 48px; }
.start-oben .mikro-text { margin-top: 16px; }
.start-oben .tippen-text { border: 2px solid currentColor; border-radius: 999px; padding: 8px 20px; text-decoration: none; margin-top: 14px; min-height: 48px; }
.start-unten { gap: 14px; padding-top: 22px; }
.start-auswahl-titel { margin: 0 0 4px; color: var(--text); font-size: 25px; line-height: 1.2; text-align: center; }
.start-unten .kacheln { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.start-unten .kacheln > .foto-gross { grid-column: 1 / -1; width: 100%; margin-top: 4px; }
.start-einst-zeile { display: grid; grid-template-columns: 28px minmax(0, 1fr) 48px 48px auto; align-items: center; gap: 6px; min-height: 58px; }
.start-einst-zeile span { font-size: 17px; overflow-wrap: anywhere; }
.start-einst-zeile button { min-width: 44px; min-height: 44px; border: 2px solid var(--line); border-radius: 12px; background: var(--card); color: var(--text); font-size: 18px; }
.start-einst-zeile button:last-child { font-size: 14px; padding: 0 5px; }
.start-einst-zeile input { width: 24px; height: 24px; accent-color: var(--petrol); }
.tagebuch-eintrag p { white-space: pre-wrap; overflow-wrap: anywhere; }
.start-unten .kachel {
  min-height: 112px; padding: 10px 5px; gap: 7px; font-size: 16px; line-height: 1.2;
  border: 2px solid var(--line); border-radius: 20px; color: var(--text);
  overflow-wrap: anywhere; box-shadow: none;
}
.start-unten .kachel svg { width: 34px; height: 34px; flex-shrink: 0; color: var(--petrol); }
.start-unten .abend-start { width: auto; }
.start-unten .foto-gross { min-height: 76px; justify-content: center; gap: 12px; padding: 10px 14px; border-radius: 20px; }
.start-unten .foto-ic { width: 40px; height: 40px; background: transparent; color: inherit; }
.start-unten .foto-titel { font-size: 20px; }
.start-unten .foto-unter { font-size: 13px; }
.start-links { justify-content: center; flex-wrap: wrap; gap: 6px 18px; }
.start-links .knopf { width: auto; min-height: 48px; padding: 0 8px; font-size: 16px; }
.abend-auswahl { gap: 20px; }
.abend-auswahl h1 { margin-top: 12px; }
.abend-auswahl p { color: var(--muted); margin-bottom: 12px; }
.start-oben .naechstes { min-height: 65px; }
.start-oben .naechstes .zeit-box[hidden] { display: none; }
.start-oben .naechstes .wann { font-size: 15px; }
.start-oben .naechstes .was { font-size: 20px; }
:root[data-theme="light"] .start-unten .kachel { background: #fff; border-color: #d4e2de; box-shadow: 0 2px 8px rgba(23, 103, 94, .06); }
:root[data-theme="light"] .start-unten .foto-gross { background: #17675e; border-color: #17675e; color: #fff; }
:root[data-theme="light"] .start-unten .foto-ic { background: transparent; color: #fff; }
:root[data-theme="light"] .start-unten .foto-unter { color: #dcefea; }
:root[data-theme="dark"] .start-unten .kachel { background: #1b2a26; border-color: #35564b; color: #f2f7f4; }
:root[data-theme="dark"] .start-unten .kachel svg { color: #4de2ca; }
:root[data-theme="dark"] .start-unten .foto-gross { background: #111b19; border-color: #35564b; color: #f2f7f4; }
:root[data-theme="dark"] .start-unten .foto-ic { background: transparent; color: #4de2ca; }
:root[data-theme="dark"] .start-unten .foto-unter { color: #c2d1ca; }
:root[data-theme="dark"] .start-oben .naechstes { background: #111b19; color: #f2f7f4; }
:root[data-theme="dark"] .start-oben .naechstes .wann { color: #c2d1ca; }
:root[data-theme="dark"] .start-oben .tippen-text { color: #4de2ca; }

/* Drei Spalten nur, solange Schrift und Trefferflächen gut lesbar bleiben. */
@media (max-width: 390px) {
  .start-unten .kacheln { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .start-unten .kachel { font-size: 17px; }
  .wahl[aria-label="Stimme"] { grid-template-columns: minmax(0, 1fr); }
}

/* Die Angehörigen-Startseite nutzt dieselben hellen und dunklen Flächen wie die Hauptseite. */
#s-angehoerige { padding: 0; gap: 0; }
.angehoerige-kopf { padding: calc(28px + env(safe-area-inset-top)) 20px 27px; border-radius: 0 0 32px 32px; background: #17675e; color: #fff; display: flex; flex-direction: column; gap: 8px; }
.angehoerige-kopf > p:first-child { font-size: 16px; font-weight: 700; }
.angehoerige-kopf h1 { font-size: 28px; overflow-wrap: anywhere; }
.angehoerige-kopf > p:last-child { font-size: 17px; }
.angehoerige-inhalt { padding: 22px 20px calc(16px + env(safe-area-inset-bottom)); flex: 1; display: flex; flex-direction: column; gap: 14px; }
.angehoerige-inhalt > h2 { margin: 0 0 5px; color: var(--text); font-size: 25px; text-align: center; }
.angehoerigen-person { padding: 4px 0 12px; border: 0; box-shadow: none; background: transparent; }
.bildschirm #angehoerige-verbindungen .karte.flach.angehoerigen-person { background: transparent; box-shadow: none; }
.angehoerigen-person h2 { color: var(--text); text-align: center; }
.angehoerigen-heute { margin: 12px 0 18px; padding: 14px; border: 2px solid var(--line); border-radius: 20px; background: var(--card); }
.angehoerigen-heute h3 { margin: 0 0 10px; color: var(--text); }
.angehoerigen-heute p { margin: 8px 0 0; }
.angehoerigen-heute-eintrag { display: block; width: 100%; margin-top: 8px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); color: var(--text); text-align: left; font: inherit; }
.angehoerigen-heute-eintrag span, .angehoerigen-heute-eintrag small { display: block; }
.angehoerigen-heute-eintrag small { margin-top: 3px; color: var(--muted); }
.angehoerigen-kacheln { gap: 10px; }
.angehoerigen-kachel { min-height: 112px; background: var(--card); border: 2px solid var(--line); box-shadow: var(--schatten); }
.angehoerigen-kachel.blau, .angehoerigen-kachel.gelb, .angehoerigen-kachel.mint, .angehoerigen-kachel.rost { background: var(--card); border-color: var(--line); }
.angehoerigen-kachel svg, .angehoerigen-kachel.blau svg, .angehoerigen-kachel.gelb svg, .angehoerigen-kachel.mint svg, .angehoerigen-kachel.rost svg { color: var(--petrol); }
.angehoerige-darstellung { display: flex; flex-direction: column; gap: 8px; font-size: 16px; color: var(--muted); }
.angehoerige-darstellung > span { text-align: center; }
.angehoerige-darstellung .wahl button { min-height: 48px; font-size: 17px; }
#angehoerige-abmelden { min-height: 48px; font-size: 17px; }
:root[data-theme="dark"] .angehoerige-kopf { background: #174f46; }
:root[data-theme="dark"] .angehoerigen-person, :root[data-theme="dark"] .karte.flach.angehoerigen-person { background: transparent; box-shadow: none; }
:root[data-theme="dark"] .angehoerigen-kachel, :root[data-theme="dark"] .angehoerigen-kachel.blau, :root[data-theme="dark"] .angehoerigen-kachel.gelb, :root[data-theme="dark"] .angehoerigen-kachel.mint, :root[data-theme="dark"] .angehoerigen-kachel.rost { background: #1b2a26; border-color: #35564b; color: #f2f7f4; }
:root[data-theme="dark"] .angehoerigen-kachel svg, :root[data-theme="dark"] .angehoerigen-kachel.blau svg, :root[data-theme="dark"] .angehoerigen-kachel.gelb svg, :root[data-theme="dark"] .angehoerigen-kachel.mint svg, :root[data-theme="dark"] .angehoerigen-kachel.rost svg { color: #4de2ca; }

/* Kompakter Kalender für freigegebene Termine, mit einer Tagesliste darunter. */
.familie-kalender-karte { padding: 14px 10px 12px; border: 2px solid var(--line); border-radius: 20px; background: var(--card); }
.familie-kalender-kopf { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 12px; }
.familie-kalender-kopf strong { font-size: 21px; text-transform: capitalize; text-align: center; }
.familie-kalender-kopf button { width: 44px; height: 44px; flex: none; border: 0; border-radius: 50%; background: var(--sand); color: var(--text); font-size: 30px; line-height: 1; }
.familie-kalender-kopf button:disabled { opacity: .35; cursor: default; }
.familie-kalender-wochen, .familie-kalender-tage { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); text-align: center; }
.familie-kalender-wochen { color: var(--muted); font-size: 14px; font-weight: 700; }
.familie-kalender-tag { min-width: 0; min-height: 52px; padding: 3px 0; border: 0; border-radius: 13px; background: transparent; color: var(--text); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 18px; }
.familie-kalender-tag i { width: 6px; height: 6px; border-radius: 50%; background: transparent; }
.familie-kalender-tag.mit-termin i { background: var(--petrol); }
.familie-kalender-tag.gewaehlt { background: var(--petrol); color: #fff; font-weight: 700; }
.familie-kalender-tag.gewaehlt i { background: #fff; }
.familie-kalender-tag:disabled { opacity: .35; cursor: default; }
.familie-kalender-auswahl { display: flex; flex-direction: column; gap: 10px; margin-top: 17px; }
.familie-kalender-auswahl h2 { color: var(--text); }
.familie-kalender-auswahl .karte { margin: 0; }
:root[data-theme="dark"] .familie-kalender-tag.gewaehlt { background: #17675e; }

/* Erinnerungen: Statuswahl und kurze, nach Fälligkeit geordnete Abschnitte. */
.familie-erinnerungen-tabs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.familie-erinnerungen-tabs button { min-height: 56px; padding: 8px; border: 2px solid var(--line); border-radius: 16px; background: var(--card); color: var(--text); font-size: 17px; font-weight: 700; }
.familie-erinnerungen-tabs button[aria-pressed="true"] { border-color: var(--petrol); background: var(--mint-soft); color: var(--petrol-dark); }
.familie-erinnerungen-liste { display: flex; flex-direction: column; gap: 10px; margin-top: 16px; }
.familie-erinnerungen-liste h3 { margin: 10px 0 0; color: var(--text); font-size: 19px; }
.familie-erinnerungen-liste .karte { margin: 0; padding: 11px 14px; border-radius: 16px; }
#familie-erinnerungen > .leise { margin-top: 12px; }
#familie-erinnerungen > [data-familie-erinnerungen-mehr] { margin-top: 15px; }
:root[data-theme="dark"] .familie-erinnerungen-tabs button[aria-pressed="true"] { background: #17675e; border-color: #4de2ca; color: #fff; }
