/* Luke-Plan im vadeha-connect-Stil: Salbei #758C70, Beige #BDBFAA */
:root {
  --sage: #758C70;
  --sage-dark: #5C7158;
  --sage-light: #E3EADF;
  --beige: #BDBFAA;
  --beige-light: #EFEFE6;
  --paper: #F7F7F2;
  --white: #FFFFFF;
  --ink: #1D241B;
  --muted: #6E7466;
  --line: #DEDFD3;
  --jana: #C9A06A;
  --jana-light: #F3E8D8;
  --ilja: #758C70;
  --ilja-light: #E1E9DD;
  --red: #B4473E;
  --kita: #8EC5EC;
  --kita-light: #DDEFFB;
  --event: #EFA25A;
  --event-light: #FDEBD8;
  --radius: 16px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--paper);
  color: var(--ink);
  font: 400 15px/1.5 "Poppins", system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-tap-highlight-color: transparent;
}
[hidden] { display: none !important; }
h1 { font-size: 24px; margin: 6px 0 4px; }
h2 { font-size: 20px; margin: 0; }
h3 { font-size: 16px; margin: 0 0 6px; }
p { margin: 6px 0; }
.leise { color: var(--muted); }
.klein { font-size: 12px; }
.mitte { text-align: center; }
.fehler { color: var(--red); min-height: 1.2em; font-size: 14px; }
.hinweis { color: var(--sage-dark); min-height: 1.2em; font-size: 14px; }
.hinweis.schlecht { color: var(--red); }

/* Grundbausteine */
.karte { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin: 12px 0; }
.karte.schmal { max-width: 420px; width: 100%; margin: 0 auto; }
label { display: block; font-size: 13px; color: var(--muted); margin: 10px 0; }
input, select, textarea {
  display: block; width: 100%; margin-top: 4px; font: inherit; color: var(--ink);
  background: var(--white); border: 1px solid var(--line); border-radius: 12px; padding: 11px 12px;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--sage); outline-offset: 1px; border-color: var(--sage); }
textarea { min-height: 80px; resize: vertical; }
.knopf {
  font: inherit; font-weight: 600; border: 0; border-radius: 12px; padding: 11px 16px; cursor: pointer;
  background: var(--sage); color: var(--white);
}
.knopf:hover { background: var(--sage-dark); }
.knopf.hell { background: var(--beige-light); color: var(--ink); border: 1px solid var(--line); }
.knopf.hell:hover { background: var(--beige); }
.knopf.rot { background: var(--white); color: var(--red); border: 1px solid #E6C3BF; }
.knopf.voll { width: 100%; margin-top: 8px; }
.knopf:disabled { opacity: .55; cursor: default; }
.knopfreihe { display: flex; gap: 8px; flex-wrap: wrap; margin: 10px 0; }
.link { background: none; border: 0; color: var(--sage-dark); font: inherit; text-decoration: underline; cursor: pointer; padding: 8px 0; }
.chip { font: inherit; font-size: 13px; border: 1px solid var(--line); background: var(--white); border-radius: 999px; padding: 5px 12px; cursor: pointer; }
.rund { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: var(--white); font-size: 22px; cursor: pointer; color: var(--ink); }
.zwei { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.zeile-zwischen { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }

/* Vollbild-Seiten */
.vollbild { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px 16px; }
.logo-gross { width: 150px; display: block; margin-bottom: 10px; }

/* Kopf und Navigation */
.kopf {
  position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 12px;
  padding: calc(10px + var(--safe-t)) 16px 10px; background: rgba(247, 247, 242, .94); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.logo-klein { height: 26px; }
.kopf-titel { font-weight: 700; font-size: 17px; color: var(--sage-dark); border-left: 2px solid var(--beige); padding-left: 12px; }
.kopf-ich { margin-left: auto; font-size: 13px; color: var(--muted); }
main { max-width: 860px; margin: 0 auto; padding: 14px 16px calc(90px + var(--safe-b)); }
nav.unten {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 6; display: flex; justify-content: center;
  background: var(--white); border-top: 1px solid var(--line); padding-bottom: var(--safe-b);
}
nav.unten button {
  flex: 1; max-width: 200px; background: none; border: 0; font: inherit; font-size: 12px; color: var(--muted);
  padding: 8px 4px 10px; cursor: pointer; position: relative;
}
nav.unten .sym { display: block; font-size: 20px; line-height: 1.2; }
nav.unten button.aktiv { color: var(--sage-dark); font-weight: 600; }
nav.unten .zahl {
  position: absolute; top: 4px; left: 50%; margin-left: 8px; background: var(--red); color: #fff; border-radius: 999px;
  font-size: 11px; min-width: 18px; height: 18px; line-height: 18px; padding: 0 5px;
}
.banner {
  max-width: 860px; margin: 10px auto 0; padding: 12px 16px; background: var(--jana-light); border: 1px solid #E8D3B5;
  border-radius: 14px; cursor: pointer; width: calc(100% - 32px);
}

/* Monat */
.monat-kopf { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.monat-kopf h2 { text-align: center; flex: 1; }
.monat-werkzeug { display: flex; align-items: center; justify-content: space-between; margin: 10px 0; gap: 10px; flex-wrap: wrap; }
.legende { display: flex; gap: 12px; font-size: 12px; color: var(--muted); flex-wrap: wrap; }
.legende span { display: inline-flex; align-items: center; gap: 5px; }
.pkt { display: inline-block; width: 12px; height: 12px; border-radius: 4px; }
.pkt.ilja { background: var(--ilja); }
.pkt.jana { background: var(--jana); }
.pkt.wechsel { background: linear-gradient(135deg, var(--ilja) 50%, var(--jana) 50%); }
.pkt.ferien { background: var(--white); border: 2px dotted var(--sage); }
.raster-kopf, .raster { display: grid; grid-template-columns: 22px repeat(7, minmax(0, 1fr)); gap: 4px; }
.kw { display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 600; color: var(--muted);
  writing-mode: vertical-rl; transform: rotate(180deg); letter-spacing: .5px; }
.kw::before { content: "KW "; font-weight: 400; }
@media (min-width: 640px) { .raster-kopf, .raster { grid-template-columns: 34px repeat(7, minmax(0, 1fr)); } .kw { writing-mode: horizontal-tb; transform: none; flex-direction: column; } .kw::before { content: "KW"; font-size: 10px; } }
.raster-kopf span { text-align: center; font-size: 12px; color: var(--muted); padding: 2px 0; }
.tag {
  position: relative; min-height: 64px; border-radius: 10px; padding: 5px 6px; border: 1px solid transparent; cursor: pointer;
  background: var(--white); display: flex; flex-direction: column; justify-content: space-between; text-align: left;
  font: inherit; color: var(--ink);
}
.tag.ilja { background: var(--ilja); color: #fff; }
.tag.jana { background: var(--jana); color: #2a2216; }
.tag.offen { background: var(--white); color: var(--muted); border: 1px dashed var(--line); }
.tag.anders { opacity: .45; }
.tag.heute { box-shadow: 0 0 0 2px var(--ink); }
.tag.ferien::after { content: ""; position: absolute; inset: 3px; border: 1.5px dotted rgba(255, 255, 255, .85); border-radius: 8px; pointer-events: none; }
.tag.jana.ferien::after { border-color: rgba(42, 34, 22, .45); }
.tag .nr { font-weight: 600; font-size: 14px; }
.tag .fei { font-size: 9.5px; line-height: 1.15; opacity: .95; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; word-break: break-word; }
.tag { overflow: hidden; min-width: 0; }
.tag .ue { font-size: 10.5px; font-weight: 600; line-height: 1.2; }
.tag .marke { position: absolute; top: 5px; right: 6px; font-size: 11px; }
@media (min-width: 640px) { .tag { min-height: 82px; padding: 7px 8px; } .tag .ue { font-size: 12px; } .tag .fei { font-size: 11px; } }
.abschnitt { margin: 22px 0 8px; }

.liste { list-style: none; margin: 0; padding: 0; }
.liste li { background: var(--white); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; margin: 6px 0; }
.liste li .wann { font-weight: 600; }
.liste li.klickbar { cursor: pointer; }
.verlauf li { font-size: 14px; }
.verlauf .zeit { color: var(--muted); font-size: 12px; display: block; }

/* Wünsche */
.wunsch { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; margin: 12px 0; }
.wunsch.markiert { box-shadow: 0 0 0 3px var(--jana); }
.wunsch .titel { font-weight: 600; font-size: 16px; }
.wunsch .meta { font-size: 12px; color: var(--muted); }
.status { display: inline-block; font-size: 12px; font-weight: 600; border-radius: 999px; padding: 2px 10px; margin-left: 6px; vertical-align: 1px; }
.status.offen { background: var(--jana-light); color: #7a5525; }
.status.angenommen { background: var(--ilja-light); color: var(--sage-dark); }
.status.abgelehnt, .status.zurueckgezogen { background: #F1E3E1; color: var(--red); }
.aenderung { margin: 10px 0; font-size: 14px; }
.aenderung div { padding: 4px 0 4px 10px; border-left: 3px solid var(--sage); margin: 4px 0; }
.aenderung div.weg { border-color: var(--red); color: var(--muted); text-decoration: line-through; }
.kommentare { margin: 10px 0; }
.kommentar { background: var(--beige-light); border-radius: 12px; padding: 8px 12px; margin: 6px 0; font-size: 14px; }
.kommentar.ich { background: var(--ilja-light); }
.kommentar b { font-size: 12px; }
.antwort { display: flex; gap: 8px; margin-top: 8px; }
.antwort input { margin: 0; }

/* Blatt */
.blatt { position: fixed; inset: 0; z-index: 20; display: flex; align-items: flex-end; justify-content: center; }
.blatt-hg { position: absolute; inset: 0; background: rgba(20, 26, 18, .45); }
.blatt-inhalt {
  position: relative; background: var(--paper); width: 100%; max-width: 620px; max-height: 92vh; overflow: auto;
  border-radius: 22px 22px 0 0; padding: 20px 18px calc(24px + var(--safe-b));
}
@media (min-width: 700px) { .blatt { align-items: center; } .blatt-inhalt { border-radius: 22px; } }
.blatt-x { position: absolute; top: 10px; right: 12px; background: none; border: 0; font-size: 28px; cursor: pointer; color: var(--muted); }
.wahl { display: grid; gap: 8px; margin: 12px 0; }
.wahl button {
  text-align: left; font: inherit; background: var(--white); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; cursor: pointer;
}
.wahl button b { display: block; }
.wahl button span { color: var(--muted); font-size: 13px; }
.wahl button:hover { border-color: var(--sage); }
.seg { display: flex; gap: 6px; margin: 6px 0; flex-wrap: wrap; }
.seg button { flex: 1; font: inherit; font-size: 14px; border: 1px solid var(--line); background: var(--white); border-radius: 10px; padding: 9px 8px; cursor: pointer; min-width: 120px; }
.seg button.an { background: var(--sage); color: #fff; border-color: var(--sage); }
fieldset { border: 1px solid var(--line); border-radius: 14px; padding: 6px 12px 10px; margin: 12px 0; background: var(--white); }
legend { font-weight: 600; padding: 0 6px; }
.haken { display: flex; align-items: center; gap: 8px; color: var(--ink); font-size: 14px; }
.haken input { width: auto; margin: 0; }
.vorschau { background: var(--white); border: 1px solid var(--line); border-radius: 14px; padding: 10px 14px; margin: 12px 0; }
.tag-kopf { display: flex; align-items: center; gap: 10px; }
.tag-farbe { width: 18px; height: 18px; border-radius: 6px; }

/* Anleitung */
.anleitung { position: fixed; inset: 0; z-index: 30; background: rgba(20, 26, 18, .6); display: flex; align-items: center; justify-content: center; padding: 16px; }
.anl-karte { background: var(--paper); border-radius: 22px; max-width: 480px; width: 100%; padding: 22px 20px 18px; max-height: 92vh; overflow: auto; }
.anl-karte h2 { margin-bottom: 8px; }
.anl-karte ol { padding-left: 20px; margin: 8px 0; }
.anl-karte li { margin: 6px 0; }
.anl-bild { background: var(--white); border: 1px solid var(--line); border-radius: 14px; padding: 12px; margin: 12px 0; }
.anl-punkte { display: flex; justify-content: center; gap: 6px; margin: 14px 0 8px; }
.anl-punkte i { width: 8px; height: 8px; border-radius: 50%; background: var(--line); }
.anl-punkte i.an { background: var(--sage); }
.anl-fuss { display: flex; justify-content: space-between; gap: 10px; }
.mini-raster { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; }
.mini-raster i { height: 26px; border-radius: 6px; background: var(--white); border: 1px solid var(--line); }
.mini-raster i.ilja { background: var(--ilja); border-color: var(--ilja); }
.mini-raster i.jana { background: var(--jana); border-color: var(--jana); }
.mini-raster i.w { background: linear-gradient(135deg, var(--jana) 50%, var(--ilja) 50%); border: 0; }
.sym-chrome { display: inline-block; border: 1px solid var(--line); border-radius: 6px; padding: 0 6px; background: var(--white); font-weight: 700; }

.toast {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(80px + var(--safe-b)); z-index: 40;
  background: var(--ink); color: #fff; padding: 12px 16px; border-radius: 14px; max-width: calc(100% - 32px); width: max-content;
  box-shadow: 0 8px 30px rgba(0, 0, 0, .25); cursor: pointer; font-size: 14px;
}

.pw-huelle { position: relative; display: block; }
.pw-huelle input { padding-right: 96px; }
.pw-auge {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%); margin-top: 2px;
  background: var(--beige-light); border: 1px solid var(--line); border-radius: 8px; padding: 5px 10px;
  font: inherit; font-size: 12px; font-weight: 600; color: var(--ink); cursor: pointer;
}

.zaehler { margin-top: 18px; }
.z-liste { list-style: none; padding: 0; margin: 8px 0; }
.z-liste li { padding: 7px 0; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; align-items: center; font-size: 14px; }
.z-liste li:last-child { border-bottom: 0; }
.z-liste li.fett .z-titel { font-weight: 600; }
.z-zahlen { white-space: nowrap; }
.z-balken { grid-column: 1 / -1; height: 6px; border-radius: 3px; background: var(--jana); overflow: hidden; }
.z-balken span { display: block; height: 100%; background: var(--ilja); }
details summary { cursor: pointer; color: var(--sage-dark); font-weight: 600; font-size: 14px; margin-top: 6px; }

.knopfreihe.eng { margin: 0; gap: 6px; }
.jahr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 4px; }
@media (min-width: 640px) { .jahr { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 900px) { .jahr { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.mini-monat { background: var(--white); border: 1px solid var(--line); border-radius: 14px; padding: 8px 8px 10px; }
.mini-titel { background: none; border: 0; font: inherit; font-weight: 700; font-size: 14px; color: var(--sage-dark); padding: 2px 2px 6px; cursor: pointer; }
.mini-tage { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 2px; }
.mini-wt { font-size: 9px; color: var(--muted); text-align: center; }
.mini-tag {
  aspect-ratio: 1; border: 0; border-radius: 4px; padding: 0; font: inherit; font-size: 10px; line-height: 1;
  background: var(--beige-light); color: var(--muted); cursor: pointer; position: relative;
}
.mini-tag.ilja { background: var(--ilja); color: #fff; }
.mini-tag.jana { background: var(--jana); color: #2a2216; }
.mini-tag.hell { color: #fff; text-shadow: 0 1px 1px rgba(0,0,0,.4); }
.mini-tag.ferien { box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.85); }
.mini-tag.feiertag { font-weight: 700; text-decoration: underline; }
.mini-tag.heute { outline: 2px solid var(--ink); outline-offset: 0; }

.pkt.kita { background: var(--kita-light); border: 2px solid var(--kita); }
.tag.kita-zu { box-shadow: inset 0 0 0 3px var(--kita); }
.tag.kita-zu.offen, .tag.kita-zu:not(.ilja):not(.jana) { background: var(--kita-light); }
.tag .kita-marke { font-size: 9.5px; font-weight: 700; line-height: 1.1; background: var(--kita-light); color: #1f4d6e; border-radius: 4px; padding: 1px 3px; align-self: flex-start; text-shadow: none; }
.tag .kita-ev { font-size: 9.5px; line-height: 1.1; background: var(--event-light); color: #7a4210; border-radius: 4px; padding: 1px 3px; align-self: stretch; text-shadow: none; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; word-break: break-word; hyphens: auto; }
.mini-tag.kita-zu { box-shadow: inset 0 0 0 2px var(--kita); }
.mini-tag.kita-zu:not(.ilja):not(.jana):not(.hell) { background: var(--kita-light); }
.kita-zeile.zu { border-left: 4px solid var(--kita); }
.kita-zeile.event { border-left: 4px solid var(--event); background: #FFF8F0; }
.warnung { background: #FBEDEB; border: 1px solid #E6C3BF; color: #7a2b24; border-radius: 12px; padding: 10px 12px; margin: 8px 0; font-size: 14px; }

.pkt.event { background: var(--event-light); border: 2px solid var(--event); }
.tag.kita-event:not(.kita-zu) { box-shadow: inset 0 0 0 3px var(--event); }
.tag.kita-event:not(.ilja):not(.jana):not(.kita-zu) { background: var(--event-light); }
.mini-tag.kita-event:not(.kita-zu) { box-shadow: inset 0 0 0 2px var(--event); }

.tag .herzen { font-size: 9px; line-height: 1; color: #E0457B; letter-spacing: -1px; text-shadow: 0 0 2px #fff, 0 0 2px #fff; align-self: flex-start; }
.tag .herzen.fuenf { font-size: 8px; }
@media (min-width: 640px) { .tag .herzen { font-size: 12px; } .tag .herzen.fuenf { font-size: 11px; } }
.herz-leg { color: #E0457B; }
.mini-tag.herz2::after, .mini-tag.herz5::after { content: "♥"; position: absolute; top: -3px; right: -2px; font-size: 8px; color: #E0457B; text-shadow: 0 0 2px #fff; }
.mini-tag.herz5::after { content: "♥♥"; }
.uz-karte { border-color: #F2C4D3; background: #FFF6F9; }
.uz-liste { margin: 6px 0 0; padding-left: 18px; font-size: 14px; }
.kita-zeile.uz-kinder { border-left: 4px solid #E0457B; }
.kita-zeile.uz-termin { border-left: 4px solid var(--beige); }
.kita-zeile.uz-weg { border-left: 4px solid var(--muted); }

.herzen { color: #E0457B; }
