/* Familien-Dashboard – Farben und Grundregeln aus dem Ferienplan, Bausteine im selben Ton. */
:root{
  color-scheme:light dark;
  --paper:#EEF2F3; --surface:#FFFFFF; --surface-2:#F7FAFA;
  --ink:#152229; --ink-2:#40525C; --muted:#6B7D87; --line:#D8E1E4; --line-soft:#E7EDEF;
  --s:#0F6B84; --s-soft:#CFE5EC; --s-ink:#0A4E61; --s-faint:#E8F2F5;
  --t:#A9611C; --t-soft:#F2E2CE; --t-ink:#7C450F; --t-faint:#FAF2E8;
  --u:#2A7856; --u-soft:#D2E7DC; --u-ink:#1D5A3F; --u-faint:#E9F3EE;
  --n-soft:#E3EAEC;
  --shadow:0 1px 2px rgba(21,34,41,.05), 0 8px 24px -16px rgba(21,34,41,.35);
  --r:14px;
}
@media (prefers-color-scheme: dark){
  :root{
    --paper:#0D1418; --surface:#141E24; --surface-2:#18242B;
    --ink:#E7EEF1; --ink-2:#BCCAD1; --muted:#8FA3AC; --line:#26343C; --line-soft:#1E2A31;
    --s:#5CB9D3; --s-soft:#133C4A; --s-ink:#A2DAEA; --s-faint:#102730;
    --t:#E0A25F; --t-soft:#3C2A16; --t-ink:#EFC694; --t-faint:#241B10;
    --u:#63BE95; --u-soft:#173B2C; --u-ink:#A6DCC3; --u-faint:#122720;
    --n-soft:#1F2C33;
    --shadow:0 1px 2px rgba(0,0,0,.4), 0 10px 30px -18px rgba(0,0,0,.9);
  }
}

*{box-sizing:border-box}
html{-webkit-text-size-adjust:100%}
body{
  margin:0; background:var(--paper); color:var(--ink);
  font-family:"IBM Plex Sans",-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  font-size:16px; line-height:1.55; -webkit-font-smoothing:antialiased;
}
.wrap{max-width:1080px; margin:0 auto; padding:clamp(24px,5vw,64px) clamp(16px,4vw,40px) 80px; display:flex; flex-direction:column; gap:clamp(24px,4vw,40px)}
h1,h2,h3{font-family:Archivo,"IBM Plex Sans",sans-serif; text-wrap:balance; margin:0}
h1{font-size:clamp(34px,6vw,56px); font-weight:700; letter-spacing:-.025em; line-height:1.02}
h2{font-size:clamp(19px,2.4vw,23px); font-weight:600; letter-spacing:-.01em}
p{margin:0}
a{color:var(--s-ink)}
.eyebrow{font-family:"IBM Plex Mono",ui-monospace,monospace; font-size:11.5px; letter-spacing:.14em; text-transform:uppercase; color:var(--muted)}
.mono{font-family:"IBM Plex Mono",ui-monospace,monospace; font-variant-numeric:tabular-nums}

header{display:flex; flex-direction:column; gap:14px}
.lede{color:var(--ink-2); max-width:64ch; font-size:17px}
.rule{height:3px; background:linear-gradient(90deg,var(--s) 0 44%,var(--t) 44% 72%,var(--u) 72% 100%); border-radius:2px; max-width:180px}

.btn{
  font:inherit; font-size:15px; font-weight:500; cursor:pointer; padding:10px 18px; border-radius:9px; min-height:44px;
  border:1px solid transparent; background:var(--ink); color:var(--paper);
}
.btn:hover{filter:brightness(1.15)}
.btn:disabled{opacity:.55; cursor:default; filter:none}
.btn.ghost{background:none; border-color:var(--line); color:var(--ink-2)}
.btn.gefahr{background:none; border-color:var(--t); color:var(--t-ink)}
.btn.gefahr.scharf{background:var(--t); border-color:var(--t); color:var(--paper)}
button:focus-visible, a:focus-visible, summary:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, [tabindex]:focus-visible{outline:2px solid var(--s); outline-offset:2px}

.tag{font-size:11.5px; padding:3px 9px; border-radius:999px; background:var(--n-soft); color:var(--ink-2); white-space:nowrap; display:inline-block; line-height:1.5}
.tag.warn{background:var(--t-soft); color:var(--t-ink)}
.tag.ok{background:var(--u-soft); color:var(--u-ink)}
.empty{background:var(--surface); border:1px dashed var(--line); border-radius:12px; padding:18px; font-size:14px; color:var(--muted)}
.hint{font-size:13.5px; color:var(--muted); max-width:70ch}

.karte{background:var(--surface); border:1px solid var(--line); border-radius:var(--r); box-shadow:var(--shadow)}

/* Meldungen */
.meldung{background:var(--s-faint); color:var(--s-ink); border:1px solid var(--s-soft); border-radius:10px; padding:11px 14px; font-size:14.5px; display:flex; gap:12px; align-items:center; flex-wrap:wrap}
.meldung.err{background:var(--t-faint); color:var(--t-ink); border-color:var(--t-soft)}
.meldung .btn{margin-left:auto}

/* Startseite */
.kacheln{display:grid; grid-template-columns:1fr; gap:12px}
@media (min-width:360px){ .kacheln{grid-template-columns:repeat(2,minmax(0,1fr))} }
@media (min-width:780px){ .kacheln{grid-template-columns:repeat(3,minmax(0,1fr)); gap:16px} }
.kachel{
  --akzent:var(--s);
  background:var(--surface); border:1px solid var(--line); border-top:3px solid var(--akzent); border-radius:var(--r);
  box-shadow:var(--shadow); padding:16px 16px 18px; min-height:132px; display:flex; flex-direction:column; gap:6px;
  text-decoration:none; color:var(--ink); transition:transform .12s ease;
}
.kachel:active{transform:scale(.98)}
.kachel.a-s{--akzent:var(--s)} .kachel.a-t{--akzent:var(--t)} .kachel.a-u{--akzent:var(--u)}
.kachel-symbol{font-size:28px; line-height:1.1}
.kachel-titel{font-family:Archivo,"IBM Plex Sans",sans-serif; font-weight:600; font-size:18px; letter-spacing:-.01em; margin-top:auto; overflow-wrap:anywhere}
.kachel-zeile{font-family:"IBM Plex Mono",monospace; font-size:12.5px; color:var(--muted)}
.kachel-zeile.kaputt{color:var(--t-ink)}
.kachel.platzhalter{border-top-color:var(--line); background:var(--surface-2); box-shadow:none}
.kachel.platzhalter::before,.kachel.platzhalter::after{content:""; display:block; border-radius:6px; background:var(--n-soft)}
.kachel.platzhalter::before{width:32px; height:32px}
.kachel.platzhalter::after{width:60%; height:14px; margin-top:auto}
.fuss{display:flex; align-items:center; gap:12px; flex-wrap:wrap; border-top:1px solid var(--line); padding-top:18px; font-size:14px; color:var(--muted)}
.fuss form{margin-left:auto}

/* Anmeldung */
.anmelden{max-width:440px; width:100%; margin:0 auto}
.anmelden form{padding:20px; display:flex; flex-direction:column; gap:16px}
.wahlen{display:grid; grid-template-columns:repeat(auto-fit,minmax(120px,1fr)); gap:10px; border:0; padding:0; margin:0}
.wahlen legend{padding:0; margin-bottom:8px}
.wahl{position:relative; display:block}
.wahl input{position:absolute; opacity:0; inset:0; margin:0; cursor:pointer}
.wahl span{
  display:flex; align-items:center; justify-content:center; min-height:64px; border-radius:12px; border:1.5px solid var(--line);
  background:var(--surface-2); font-family:Archivo,"IBM Plex Sans",sans-serif; font-weight:600; font-size:19px; color:var(--ink-2);
}
.wahl input:checked + span{border-color:var(--s); background:var(--s-faint); color:var(--s-ink); box-shadow:inset 0 0 0 1px var(--s)}
.wahl input:focus-visible + span{outline:2px solid var(--s); outline-offset:2px}

/* Formularfelder */
.feld{display:flex; flex-direction:column; gap:6px}
.feld > .feld-name, .feld > label{font-size:11.5px; letter-spacing:.07em; text-transform:uppercase; color:var(--muted)}
.feld input[type=text], .feld input[type=url], .feld input[type=number], .feld input[type=date], .feld input[type=password], .feld textarea{
  font:inherit; font-size:16px; color:var(--ink); background:var(--surface-2);
  border:1px solid var(--line); border-radius:9px; padding:10px 12px; width:100%; min-height:44px;
}
.feld textarea{resize:vertical; line-height:1.45}
.feld input[type=date]{appearance:none; -webkit-appearance:none; display:block}
.knoepfe{display:flex; flex-wrap:wrap; gap:7px}
.knoepfe button{
  font:inherit; font-size:14.5px; font-weight:500; cursor:pointer; padding:8px 14px; min-height:44px; border-radius:999px;
  border:1px solid var(--line); background:var(--surface); color:var(--ink-2);
}
.knoepfe button[aria-pressed="true"]{background:var(--ink); border-color:var(--ink); color:var(--paper)}
.schalter-zeile{display:flex; align-items:center; gap:12px; min-height:44px; cursor:pointer; font-size:15px}
.schalter{appearance:none; -webkit-appearance:none; width:50px; height:30px; border-radius:999px; background:var(--n-soft); border:1px solid var(--line); position:relative; cursor:pointer; flex:none; margin:0; transition:background .15s}
.schalter::after{content:""; position:absolute; top:3px; left:3px; width:22px; height:22px; border-radius:50%; background:var(--surface); box-shadow:0 1px 3px rgba(0,0,0,.25); transition:transform .15s}
.schalter:checked{background:var(--u); border-color:var(--u)}
.schalter:checked::after{transform:translateX(20px)}

/* Sterne */
.sterne{color:var(--t); letter-spacing:1px; white-space:nowrap}
.sterne .leer{color:var(--muted); opacity:.7}
.sterne-wahl{display:flex; gap:2px}
.sterne-wahl button{font:inherit; font-size:26px; line-height:1; background:none; border:0; cursor:pointer; color:var(--muted); min-width:44px; min-height:44px; padding:0}
.sterne-wahl button.an{color:var(--t)}

/* Themenseite */
.zurueck{display:inline-flex; align-items:center; min-height:44px; text-decoration:none; font-family:"IBM Plex Mono",monospace; font-size:12.5px; letter-spacing:.1em; text-transform:uppercase; color:var(--muted); align-self:flex-start}
.kopf{display:flex; flex-direction:column; gap:8px}
.kopf h1{font-size:clamp(30px,6vw,48px); overflow-wrap:anywhere}
.suche{font:inherit; font-size:16px; color:var(--ink); background:var(--surface); border:1px solid var(--line); border-radius:10px; padding:10px 14px; width:100%; min-height:44px}
.filterbox{display:flex; flex-direction:column; gap:10px}
.chips{display:flex; flex-wrap:wrap; gap:7px}
.chips button{
  font:inherit; font-size:13.5px; font-weight:500; cursor:pointer; padding:6px 13px; min-height:44px; border-radius:999px;
  border:1px solid var(--line); background:var(--surface); color:var(--ink-2); max-width:100%; overflow-wrap:anywhere;
}
.chips button[aria-pressed="true"]{background:var(--ink); border-color:var(--ink); color:var(--paper)}
.liste{display:flex; flex-direction:column; gap:10px}
.eintrag{
  background:var(--surface); border:1px solid var(--line); border-radius:12px; box-shadow:var(--shadow);
  padding:10px 14px 12px 8px; display:flex; gap:6px; align-items:flex-start; cursor:pointer; min-width:0;
}
.eintrag.ohne-haken{padding-left:16px}
.eintrag.fertig .eintrag-titel{color:var(--muted)}
.eintrag-text{display:flex; flex-direction:column; gap:6px; min-width:0; flex:1; padding-top:9px}
.eintrag-titel{font-weight:600; font-size:16.5px; line-height:1.3; overflow-wrap:anywhere}
.eintrag-titel .extern{display:inline-block; text-decoration:none; padding:0 6px; font-weight:500}
.eintrag-tags{display:flex; flex-wrap:wrap; gap:6px; align-items:center}
.eintrag-tags .tag{white-space:normal}
.eintrag-meta{font-size:11.5px; color:var(--muted)}
.haken{
  flex:none; width:44px; height:44px; border:0; background:none; cursor:pointer; padding:0; display:flex; align-items:center; justify-content:center;
}
.haken::before{
  content:""; width:24px; height:24px; border-radius:50%; border:2px solid var(--line); background:var(--surface-2);
  display:flex; align-items:center; justify-content:center; font-size:14px; font-weight:700; color:var(--paper); line-height:1;
}
.haken[aria-pressed="true"]::before{content:"✓"; background:var(--u); border-color:var(--u)}
.erledigte{display:flex; flex-direction:column; gap:10px}
.erledigte summary{cursor:pointer; min-height:44px; display:flex; align-items:center; font-size:14px; color:var(--muted); list-style-position:inside}
.erledigte[open] summary{margin-bottom:4px}
.neu-leiste{position:fixed; left:0; right:0; bottom:0; padding:10px clamp(16px,4vw,40px) calc(10px + env(safe-area-inset-bottom)); background:linear-gradient(transparent,var(--paper) 30%); z-index:5}
.neu-leiste .btn{width:100%; max-width:1000px; display:block; margin:0 auto; min-height:50px; font-size:16px}
.mit-leiste{padding-bottom:110px}

/* Formular-Blatt */
dialog.blatt{
  border:1px solid var(--line); background:var(--surface); color:var(--ink); padding:0; box-shadow:var(--shadow);
  width:100%; max-width:100%; max-height:92dvh; margin:auto 0 0; border-radius:18px 18px 0 0;
}
@media (min-width:640px){ dialog.blatt{width:560px; margin:auto; border-radius:var(--r)} }
dialog.blatt::backdrop{background:rgba(13,20,24,.5)}
.blatt form{display:flex; flex-direction:column; gap:16px; padding:20px 18px calc(18px + env(safe-area-inset-bottom))}
.blatt h2{font-size:21px}
.blatt-knoepfe{display:flex; gap:10px; flex-wrap:wrap; position:sticky; bottom:0; background:var(--surface); padding-top:8px}
.blatt-knoepfe .btn[type=submit]{flex:1}

@media (prefers-reduced-motion:reduce){ *{animation:none!important; transition:none!important} }
