/* Haushaltshelden – Comic-Stil auf hellem Grund (Philipp, 07.10.2026: "kein schwarzer Hintergrund").
   Keine style-Attribute (CSP) – alles über Klassen; Breiten setzt app.js über element.style. */

@font-face { font-family: "Bangers"; src: url("/statisch/schriften/bangers.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "Lexend"; src: url("/statisch/schriften/lexend.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }

:root {
  --tinte: #111111;
  --papier: #FFFFFF;
  --punkt: #DFE5F2;
  --rot: #E8322A;
  --rot-hell: #FDE4E1;
  --gelb: #FFD23F;
  --blau: #2F6BFF;
  --tuerkis: #3EC9F0;
  --orange: #FF7A1A;
  --gruen: #1A8F50;
  --grau: #5C6270;
  --linie: 3px solid var(--tinte);
  --schatten: 4px 4px 0 var(--tinte);
  --leiste: 76px;
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: "Lexend", system-ui, sans-serif;
  color: var(--tinte);
  background-color: var(--papier);
  background-image: radial-gradient(var(--punkt) 1.5px, transparent 1.5px);
  background-size: 13px 13px;
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}
button, input, select { font: inherit; color: inherit; }
input, select { font-size: max(16px, 1em); }
button { cursor: pointer; }
[hidden] { display: none !important; }

.wort { font-family: "Bangers", "Lexend", sans-serif; font-weight: 400; letter-spacing: 1.5px; margin: 0; }

/* --- Tor (Anmeldung) --- */
.tor { min-height: 100dvh; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 16px; padding: 32px 20px; text-align: center; }
.tor-logo svg { width: 160px; height: 160px; }
.tor .wort { font-size: 40px; color: var(--gelb); -webkit-text-stroke: 1.5px var(--tinte); text-shadow: 3px 3px 0 var(--tinte); }
.tor-text { max-width: 320px; line-height: 1.45; }
.fehler { color: var(--rot); font-weight: 700; min-height: 1.2em; }

/* --- Gerüst --- */
.inhalt { padding: calc(14px + env(safe-area-inset-top)) 14px calc(var(--leiste) + 28px + env(safe-area-inset-bottom));
  max-width: 560px; margin: 0 auto; display: flex; flex-direction: column; gap: 12px; outline: none; }

.kopf { display: flex; align-items: center; gap: 10px; }
.kopf-logo { width: 50px; height: 50px; flex-shrink: 0; }
.kopf-logo svg { width: 50px; height: 50px; display: block; }
.kopf-text { flex: 1; min-width: 0; }
.kopf-titel { font-family: "Bangers", sans-serif; font-size: 34px; line-height: 1; letter-spacing: 1.5px;
  color: var(--gelb); -webkit-text-stroke: 1.3px var(--tinte); text-shadow: 3px 3px 0 var(--rot); }
.kopf-unter { font-size: 12px; color: var(--grau); margin-top: 3px; }
.kopf-knopf { width: 44px; height: 44px; border: var(--linie); background: var(--papier); display: flex;
  align-items: center; justify-content: center; flex-shrink: 0; }
.kopf-knopf svg { width: 22px; height: 22px; fill: none; stroke: var(--tinte); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.kasten { align-self: flex-start; background: var(--gelb); border: var(--linie); padding: 4px 10px;
  font-size: 13px; font-weight: 700; transform: rotate(-1.2deg); }

/* --- Felder (Comic-Panels) --- */
.feld { border: var(--linie); box-shadow: var(--schatten); background: var(--papier); padding: 12px; }
.feld-schief { transform: rotate(-0.8deg); }
.feld-raster { background-image: radial-gradient(rgba(0, 0, 0, 0.14) 1.5px, transparent 1.5px); background-size: 9px 9px; }
.feld-orange { background-color: var(--orange); }
.feld-tuerkis { background-color: var(--tuerkis); }
.feld-gelb { background-color: var(--gelb); }
.feld-titel { font-family: "Bangers", sans-serif; font-size: 26px; letter-spacing: 1px; line-height: 1.05; }
.feld-titel-weiss { color: var(--papier); -webkit-text-stroke: 1.2px var(--tinte); text-shadow: 2px 2px 0 var(--tinte); }
.zeile2 { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.klein { font-size: 13px; }
.leise { font-size: 12px; color: var(--grau); }
.fett { font-weight: 700; }
.betrag { font-family: "Bangers", sans-serif; font-size: 24px; letter-spacing: 0.5px; white-space: nowrap; }
.betrag-gross { font-size: 54px; line-height: 1; color: var(--papier); -webkit-text-stroke: 2px var(--tinte); text-shadow: 4px 4px 0 var(--tinte); }
.plus { color: var(--gruen); }
.minus { color: var(--rot); }

/* --- Kinder-Panels auf "Heute" --- */
.raster2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.held { border: var(--linie); box-shadow: var(--schatten); padding: 10px; display: flex; flex-direction: column;
  gap: 6px; min-height: 150px; text-align: left; color: var(--papier); }
.held .feld-titel { font-size: 22px; }
.held-blase { align-self: flex-start; background: var(--papier); color: var(--tinte); border: var(--linie);
  border-radius: 14px; padding: 5px 9px; font-size: 12px; font-weight: 700; max-width: 100%; }
.held-fuss { margin-top: auto; display: flex; justify-content: space-between; align-items: baseline; gap: 6px; }
.f-blau { background-color: var(--blau); }
.f-gruen { background-color: var(--gruen); }
.f-orange { background-color: var(--orange); color: var(--tinte); }
.f-pink { background-color: #D93C82; }
.f-rot { background-color: var(--rot); }
.f-tuerkis { background-color: var(--tuerkis); color: var(--tinte); }
.f-lila { background-color: #6E46C8; }
.fb-blau { color: var(--blau); } .fb-gruen { color: var(--gruen); } .fb-orange { color: #C25200; }
.fb-pink { color: #C4306F; } .fb-rot { color: var(--rot); } .fb-tuerkis { color: #0B7FA3; } .fb-lila { color: #6E46C8; }
.ts-blau { text-shadow: 3px 3px 0 var(--blau); } .ts-gruen { text-shadow: 3px 3px 0 var(--gruen); }
.ts-orange { text-shadow: 3px 3px 0 var(--orange); } .ts-pink { text-shadow: 3px 3px 0 #D93C82; }
.ts-rot { text-shadow: 3px 3px 0 var(--rot); } .ts-tuerkis { text-shadow: 3px 3px 0 var(--tuerkis); } .ts-lila { text-shadow: 3px 3px 0 #6E46C8; }

.balken { height: 12px; border: 2px solid var(--tinte); background: var(--papier); overflow: hidden; }
.balken > i { display: block; height: 100%; width: 0; background: var(--gelb); }

/* --- Kinderauswahl (Eltern-Modus) --- */
.wahl { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.chip-kind { width: 46px; height: 46px; border: var(--linie); font-family: "Bangers", sans-serif;
  font-size: 22px; display: flex; align-items: center; justify-content: center; }
.chip-kind:not(.an) { background: var(--papier); }
/* Gewählt: Farbe des Kindes als Fläche (aus .f-*), Buchstabe weiß – bei Orange/Türkis schwarz. */
.chip-kind.an { box-shadow: 3px 3px 0 var(--gelb), 3px 3px 0 1px var(--tinte); transform: rotate(-3deg); color: var(--papier); }
.chip-kind.an.f-orange, .chip-kind.an.f-tuerkis { color: var(--tinte); }
.eltern-band { flex: 1; min-width: 150px; background: var(--gelb); border: var(--linie); padding: 7px 9px; font-size: 13px; font-weight: 700; }

/* --- Einsatz-Zeilen --- */
.einsatz { border: var(--linie); background: var(--papier); padding: 10px 12px; display: flex; flex-direction: column; gap: 8px; }
.einsatz-kopf { display: flex; align-items: center; gap: 10px; }
.einsatz-text { flex: 1; min-width: 0; }
.einsatz-titel { font-weight: 700; overflow-wrap: anywhere; }
.einsatz.erledigt .einsatz-titel { color: var(--grau); text-decoration: line-through; }
.einsatz.verpasst { border-color: var(--rot); background: var(--rot-hell); }
.einsatz.mission { border-color: var(--tinte); background: #E3F7FD; }
.einsatz.muell { border-color: var(--orange); }
.zack { font-family: "Bangers", sans-serif; font-size: 24px; color: var(--gelb); -webkit-text-stroke: 1px var(--tinte); transform: rotate(-10deg); }
.autsch { font-family: "Bangers", sans-serif; font-size: 18px; color: var(--papier); background: var(--rot); border: 2px solid var(--tinte); padding: 0 6px; transform: rotate(4deg); white-space: nowrap; }
.haken { width: 54px; height: 54px; border: var(--linie); background: var(--gruen); box-shadow: 3px 3px 0 var(--gelb), 3px 3px 0 1px var(--tinte);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.haken:disabled { background: #B9C0CC; box-shadow: none; }
.haken svg { width: 28px; height: 28px; fill: none; stroke: var(--papier); stroke-width: 3.2; stroke-linecap: round; stroke-linejoin: round; }
.zwei { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.drei { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; border: var(--linie); }
.drei > button { border: none; border-right: var(--linie); background: var(--papier); min-height: 46px; font-weight: 700; font-size: 13px; }
.drei > button:last-child { border-right: none; }
.drei > button.an { background: var(--gelb); }

/* --- Knöpfe --- */
.knopf { min-height: 48px; border: var(--linie); background: var(--papier); padding: 0 14px; font-weight: 700; }
.knopf-wort { font-family: "Bangers", sans-serif; font-size: 21px; letter-spacing: 1px; font-weight: 400; }
.knopf-gruen { background: var(--gruen); color: var(--papier); }
.knopf-rot { background: var(--rot); color: var(--papier); }
.knopf-blau { background: var(--blau); color: var(--papier); }
.knopf-gelb { background: var(--gelb); }
.knopf-weiss-rot { background: var(--papier); color: var(--rot); }
.knopf-gross { min-height: 58px; font-family: "Bangers", sans-serif; font-size: 28px; letter-spacing: 2px; font-weight: 400;
  box-shadow: var(--schatten); width: 100%; text-shadow: 2px 2px 0 var(--tinte); }
.knopf-klein { min-height: 40px; font-size: 13px; padding: 0 10px; border-width: 2px; }
.knopf-gestrichelt { border-style: dashed; background: transparent; width: 100%; }
.knopf:disabled { opacity: 0.5; }

/* --- Formulare --- */
.label { font-size: 12px; font-weight: 700; letter-spacing: 0.5px; text-transform: uppercase; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { min-height: 40px; border: 2px solid var(--tinte); background: var(--papier); padding: 6px 10px; font-size: 13px; font-weight: 600; }
.chip.an { border-width: 3px; background: var(--orange); transform: rotate(-1.5deg); }
.chip.mission.an { background: var(--tuerkis); }
.eingabe { width: 100%; min-width: 0; max-width: 100%; min-height: 46px; border: var(--linie); padding: 8px 10px; background: var(--papier); }
/* iOS-Safari gibt Uhrzeitfeldern eine eigene Mindestbreite – dann ragen sie über den Rand (07.10.2026). */
.eingabe[type="time"] { -webkit-appearance: none; appearance: none; display: block; text-align: left; }
.eingabe[type="time"]::-webkit-date-and-time-value { text-align: left; }
.stepper { display: flex; align-items: center; gap: 8px; }
.stepper button { width: 46px; height: 46px; border: var(--linie); background: var(--papier); font-size: 22px; font-weight: 700; }
.stepper .betrag { min-width: 82px; text-align: center; font-size: 30px; }
.reihe { display: flex; align-items: center; gap: 8px; }
.reihe .eingabe { flex: 1; }
.schieber { width: 100%; accent-color: var(--orange); }
.teilung { display: flex; height: 44px; border: var(--linie); }
.teilung > div { display: flex; align-items: center; justify-content: center; font-family: "Bangers", sans-serif; font-size: 19px; overflow: hidden; white-space: nowrap; }
.teilung .t-sparen { background: var(--orange); }
.teilung .t-bar { background: var(--tuerkis); flex: 1; }
.liste { display: flex; flex-direction: column; }
.liste > div { display: flex; justify-content: space-between; gap: 10px; padding: 9px 0; border-bottom: 2px solid var(--tinte); font-size: 14px; }
.liste > div:last-child { border-bottom: none; }

/* --- Leiste --- */
.leiste { position: fixed; left: 0; right: 0; bottom: 0; height: calc(var(--leiste) + env(safe-area-inset-bottom));
  padding: 8px 8px calc(8px + env(safe-area-inset-bottom)); background: var(--papier); border-top: var(--linie);
  display: flex; justify-content: space-around; align-items: center; z-index: 10; }
.leiste-knopf { flex: 1; max-width: 90px; height: 58px; border: none; background: none; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 2px; font-size: 11px; font-weight: 700; position: relative; }
.leiste-knopf svg { width: 26px; height: 26px; fill: none; stroke: var(--tinte); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.leiste-knopf.an { color: var(--rot); }
.leiste-knopf.an svg { stroke: var(--rot); }
.leiste-plus { width: 64px; height: 64px; margin-top: -28px; border: var(--linie); background: var(--rot); box-shadow: var(--schatten);
  display: flex; align-items: center; justify-content: center; transform: rotate(-4deg); }
.leiste-plus svg { width: 30px; height: 30px; fill: none; stroke: var(--papier); stroke-width: 3.5; stroke-linecap: round; }
/* iOS schiebt fest positionierte Leisten bei offener Tastatur mit (Philipp, 07.10.2026):
   solange getippt wird, ist die Leiste weg. */
body.tippt .leiste, body.tippt .hinweis { display: none; }
.drei.zwei-spalten { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.punkt { position: absolute; top: 6px; right: 22%; width: 12px; height: 12px; border-radius: 6px; background: var(--rot); border: 2px solid var(--papier); }

/* Wischen nach links: rote Fläche mit LÖSCHEN dahinter */
.wisch { position: relative; overflow: hidden; }
.wisch-hinter { position: absolute; inset: 0; display: flex; justify-content: flex-end; background: var(--rot); }
.wisch-knopf { width: 110px; border: none; background: var(--rot); color: var(--papier); font-family: "Bangers", sans-serif; font-size: 20px; letter-spacing: 1px; }
.wisch-vorn { position: relative; background: var(--papier); transition: transform 0.2s ease; touch-action: pan-y; }
.wisch-vorn.zieht { transition: none; }
.wisch-vorn > .feld { box-shadow: none; }
.hinweis { position: fixed; left: 14px; right: 14px; bottom: calc(var(--leiste) + 18px + env(safe-area-inset-bottom));
  background: var(--tinte); color: var(--papier); padding: 12px 14px; display: flex; justify-content: space-between;
  align-items: center; gap: 10px; z-index: 20; font-weight: 600; box-shadow: 4px 4px 0 var(--gelb); }
.hinweis button { border: 2px solid var(--papier); background: none; color: var(--gelb); min-height: 40px; padding: 0 10px; font-weight: 700; }

@media (min-width: 700px) {
  .raster2 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
