/* meinbaby.smafla.de — mobil zuerst, Shop-Familie: Poppins + Sriracha, #f47c7c / #fff8f7 / #f7ca5b */

@font-face { font-family: "Poppins"; font-weight: 400; font-display: swap; src: url(fonts/poppins-400.woff2) format("woff2"); }
@font-face { font-family: "Poppins"; font-weight: 600; font-display: swap; src: url(fonts/poppins-600.woff2) format("woff2"); }
@font-face { font-family: "Sriracha"; font-weight: 400; font-display: swap; src: url(fonts/sriracha-400.woff2) format("woff2"); }

:root {
  --akzent: #f47c7c;
  --akzent-dunkel: #c95454;
  --hell: #fff8f7;
  --gelb: #f7ca5b;
  --blase: #ffe3e0;
  --text: #4a3b3b;
  --leise: #8a7676;
  --karte: #ffffff;
  --linie: #f3dedb;
  --rund: 22px;
  --schatten: 0 6px 24px rgba(201, 84, 84, .10);
}
.design-mint     { --akzent: #5fb89a; --akzent-dunkel: #3d8a70; --hell: #f3fbf7; --blase: #d7f1e6; --linie: #d9ece4; }
.design-himmel   { --akzent: #6fa8dc; --akzent-dunkel: #44799f; --hell: #f4f8fd; --blase: #dbe9f7; --linie: #dce6f0; }
.design-sonne    { --akzent: #e6a817; --akzent-dunkel: #a87700; --hell: #fffbf0; --blase: #fdefc4; --linie: #f2e6c4; }
.design-lavendel { --akzent: #a68bd6; --akzent-dunkel: #7559a8; --hell: #f8f5fd; --blase: #e7defa; --linie: #e6def2; }

* { box-sizing: border-box; }
[hidden] { display: none !important; }
.karte, .eintrag { scroll-margin-top: 64px; }
html, body { overflow-x: clip; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font: 400 16px/1.55 "Poppins", system-ui, sans-serif;
  color: var(--text);
  background: var(--hell);
  min-height: 100vh;
}
a { color: var(--akzent-dunkel); }
h1, h2 { font-family: "Sriracha", "Poppins", cursive; font-weight: 400; line-height: 1.2; margin: 0 0 .5em; }
h1 { font-size: 2rem; }
h2 { font-size: 1.35rem; }
p { margin: 0 0 .9em; }
img { max-width: 100%; height: auto; }

.schmal { max-width: 560px; margin: 0 auto; padding: 16px 16px 40px; }
.mitte { text-align: center; }
.leise { color: var(--leise); }
.klein { font-size: .875rem; }
.gross-emoji { font-size: 3rem; line-height: 1; margin-bottom: .3em; }

.karte {
  background: var(--karte);
  border-radius: var(--rund);
  box-shadow: var(--schatten);
  padding: 20px;
  margin: 0 0 18px;
}

/* Kopf */
.kopf { position: relative; text-align: center; padding: 28px 8px 18px; }
.kopf-blase {
  position: absolute; inset: 0 -40px auto; height: 190px; z-index: -1;
  background: radial-gradient(circle at 30% 40%, var(--blase) 0 38%, transparent 39%),
              radial-gradient(circle at 72% 30%, color-mix(in srgb, var(--gelb) 35%, white) 0 22%, transparent 23%);
}
.kopf-foto {
  width: 168px; height: 168px; border-radius: 50%; object-fit: cover;
  border: 6px solid #fff; box-shadow: var(--schatten); background: var(--blase);
}
.kopf-foto-leer { display: inline-flex; align-items: center; justify-content: center; font-size: 4.5rem; }
.kopf-name { font-size: 2.4rem; color: var(--akzent-dunkel); margin: .35em 0 .1em; overflow-wrap: anywhere; }
.kopf-unter { font-size: 1.05rem; margin: 0 0 .4em; }
.kopf-datum { margin: 0; }

/* Familien-Seite (E8): Kind-Kacheln oben, je Kind ein Abschnitt mit Anker #kind-<nr> */
.familie-kopf { padding-bottom: 8px; }
.kinder-kacheln { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin: 0 0 22px; }
.kind-kachel {
  flex: 0 1 150px; display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 14px 10px 12px; border-radius: var(--rund); background: var(--karte); box-shadow: var(--schatten);
  text-decoration: none; color: var(--text); text-align: center;
}
.kind-kachel:hover, .kind-kachel:focus-visible { box-shadow: 0 0 0 3px var(--blase), var(--schatten); }
.kachel-foto {
  width: 88px; height: 88px; border-radius: 50%; object-fit: cover; margin-bottom: 6px;
  border: 4px solid #fff; box-shadow: var(--schatten); background: var(--blase);
}
.kachel-foto.kopf-foto-leer { font-size: 2.6rem; }
.kachel-name { font-family: "Sriracha", "Poppins", cursive; font-size: 1.25rem; color: var(--akzent-dunkel); line-height: 1.2; overflow-wrap: anywhere; }
.kachel-alter { font-size: .8rem; color: var(--leise); }
.kind { scroll-margin-top: 16px; padding-top: 8px; }
.kind + .kind { border-top: 3px dotted var(--linie); margin-top: 10px; }
.kind-kopf { padding-top: 18px; }
.kind-kopf .kopf-foto { width: 132px; height: 132px; }
.kind-kopf .kopf-name { font-size: 2rem; }
.kinder-liste { list-style: none; margin: 0 0 6px; padding: 0; }
.kinder-zeile { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 16px; }
.kinder-zeile + .kinder-zeile { margin-top: 6px; }
.kinder-zeile.aktiv { background: var(--blase); }
.kinder-name { display: flex; flex-direction: column; text-decoration: none; color: var(--text); min-width: 0; overflow-wrap: anywhere; }
.platz-titel { color: var(--akzent-dunkel); }
.familie-karte { background: color-mix(in srgb, var(--gelb) 18%, white); }

/* Einträge */
.bereich h2 { color: var(--akzent-dunkel); }
.eintraege { list-style: none; margin: 0; padding: 0; }
.eintrag { display: flex; gap: 12px; padding: 12px 0; border-top: 1px dashed var(--linie); }
.eintrag:first-child { border-top: 0; }
.eintrag-emoji {
  flex: 0 0 42px; height: 42px; border-radius: 50%; background: var(--blase);
  display: inline-flex; align-items: center; justify-content: center; font-size: 1.3rem;
}
.eintrag-inhalt { flex: 1; min-width: 0; display: block; }
.eintrag-titel { display: block; font-size: .85rem; color: var(--leise); }
.eintrag-wert { display: block; font-weight: 600; font-size: 1.05rem; overflow-wrap: anywhere; }
.eintrag-text { margin: .3em 0 0; overflow-wrap: anywhere; }
.eintrag-foto { display: block; margin-top: 10px; border-radius: 16px; }
.eintrag.privat .eintrag-emoji { background: color-mix(in srgb, var(--gelb) 40%, white); }

/* Knöpfe und Formulare */
.knopf {
  display: inline-block; border: 0; cursor: pointer; text-decoration: none;
  font: 600 1rem/1.2 "Poppins", system-ui, sans-serif;
  color: #fff; background: var(--akzent); border-radius: 999px; padding: 13px 24px;
  box-shadow: 0 4px 14px color-mix(in srgb, var(--akzent) 35%, transparent);
}
.knopf:hover, .knopf:focus-visible { background: var(--akzent-dunkel); }
.knopf.zweit { background: #fff; color: var(--akzent-dunkel); box-shadow: inset 0 0 0 2px var(--akzent); }
.knopf.zweit:hover { background: var(--blase); }
.knopf.klein { padding: 8px 16px; font-size: .9rem; }
.knopf.gefahr { background: #fff; color: #b33a3a; box-shadow: inset 0 0 0 2px #e9b4b4; }
.knopf.plus { background: var(--gelb); color: #5a4300; box-shadow: none; margin-top: 6px; }
.rund {
  width: 36px; height: 36px; border-radius: 50%; border: 0; cursor: pointer;
  background: var(--blase); color: var(--akzent-dunkel); font-size: 1.1rem;
}
.unauffaellig { color: var(--leise); text-decoration: none; font-size: .9rem; }

.formular { display: flex; flex-direction: column; gap: 6px; text-align: left; }
.formular label { font-size: .9rem; font-weight: 600; margin-top: 8px; }
.formular .knopf { margin-top: 14px; align-self: flex-start; }
.mitte .formular .knopf { align-self: center; }
.mitte .formular label { text-align: center; }
input, select, textarea {
  font: inherit; color: inherit; width: 100%;
  border: 2px solid var(--linie); border-radius: 14px; padding: 11px 14px; background: #fff;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--akzent); }
input[type=file] { padding: 8px; font-size: .9rem; }
input[type=checkbox], input[type=radio] { width: auto; }
.pin { font-size: 1.6rem; letter-spacing: .5em; text-align: center; max-width: 200px; align-self: center; }
/* Vier Kreise, die sich beim Tippen füllen (app.js); das Feld selbst bleibt zum Tippen darüber */
.pin-feld { position: relative; width: 100%; max-width: 200px; align-self: center; }
.pin-feld .pin { color: transparent; caret-color: transparent; max-width: none; }
.pin-punkte {
  position: absolute; inset: 0; pointer-events: none;
  display: flex; justify-content: center; align-items: center; gap: 16px;
}
.pin-punkte i {
  width: 18px; height: 18px; border-radius: 50%;
  border: 2px solid var(--linie); background: #fff; transition: background .12s, border-color .12s, transform .12s;
}
.pin-punkte i.voll { background: var(--akzent); border-color: var(--akzent); transform: scale(1.1); }
.pin-feld .pin:focus + .pin-punkte i.dran { border-color: var(--akzent); }
.reihe { display: flex; gap: 8px; }
.emoji-feld { flex: 0 0 64px; text-align: center; font-size: 1.3rem; padding: 8px; }
.haken { display: inline-flex; gap: 6px; align-items: center; font-weight: 400 !important; margin: 0 !important; }
.foto-zeile { display: flex; gap: 12px; align-items: center; }
.mini { width: 64px; height: 64px; object-fit: cover; border-radius: 12px; }

/* Hinweise */
.hinweis {
  position: sticky; top: 0; z-index: 20; text-align: center; padding: 12px 16px;
  background: #e7f6ec; color: #245c37; font-weight: 600; font-size: .95rem;
}
.hinweis-fehler { background: #fde8e8; color: #8f2a2a; }
.hinweis-grenze { background: color-mix(in srgb, var(--gelb) 30%, white); color: #5a4300; }
.hinweis-box { border-radius: 14px; padding: 12px; }
.hinweis-box.fehler { background: #fde8e8; color: #8f2a2a; }

.leiste {
  display: flex; justify-content: space-between; align-items: center; gap: 8px;
  max-width: 560px; margin: 0 auto; padding: 12px 16px 0; font-size: .9rem;
}
.leiste form { margin: 0; }
.leiste .knopf { flex: none; white-space: nowrap; }
.winzig { font-size: .7rem; }

/* Demo zum Ausprobieren (E9): schmales Band, eine Zeile, immer sichtbar. Meldungen wie
   „Gespeichert." kleben in der Demo nicht mit — sonst wächst der Kopf über den Inhalt. */
html[data-demo] { scroll-padding-top: 56px; }
html[data-demo] .hinweis { position: static; }
.demo-band {
  position: sticky; top: 0; z-index: 20;
  background: var(--gelb); color: #4a3700;
  display: flex; justify-content: center; align-items: center; gap: 10px;
  padding: 8px 12px; font-size: .85rem; line-height: 1.3; white-space: nowrap;
  box-shadow: 0 2px 8px rgba(74, 59, 59, .15);
}
.demo-band a { color: inherit; font-weight: 600; }
.demo-marke {
  flex: none; background: #4a3700; color: var(--gelb); border-radius: 6px;
  padding: 3px 8px; font-weight: 800; font-size: .8rem; letter-spacing: .08em; text-transform: uppercase;
}
/* Kaufbalken unten: immer sichtbar, das Modal (z-index 50) liegt darüber */
html[data-demo] body { padding-bottom: calc(76px + env(safe-area-inset-bottom)); }
.demo-kauf {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  display: flex; justify-content: center; align-items: center; gap: 12px;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  background: #fff; border-top: 1px solid var(--linie);
  box-shadow: 0 -4px 16px rgba(74, 59, 59, .12);
}
.demo-kauf-text { font-size: .95rem; line-height: 1.3; }
.demo-kauf-text span { display: block; color: var(--leise); font-size: .85rem; }
.demo-kauf .knopf { flex: none; white-space: nowrap; }
.demo-tipp { background: var(--blase); border-radius: 14px; padding: 10px 14px; margin: 12px 0 0; font-size: .92rem; line-height: 1.45; }
.demo-pin { background: var(--blase); border-radius: 12px; padding: 8px 12px; margin: 0 0 8px; }
html.demo-laedt body { visibility: hidden; }

/* Bearbeiten */
.platz-zeile { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.balken { height: 10px; background: var(--blase); border-radius: 99px; margin: 10px 0; overflow: hidden; }
.balken span { display: block; height: 100%; background: var(--akzent); border-radius: 99px; }
.balken-0 { width: 0 } .balken-10 { width: 10% } .balken-20 { width: 20% } .balken-30 { width: 30% }
.balken-40 { width: 40% } .balken-50 { width: 50% } .balken-60 { width: 60% } .balken-70 { width: 70% }
.balken-80 { width: 80% } .balken-90 { width: 90% } .balken-100 { width: 100% }
.plus-bald { display: block; margin-top: 4px; }

.bereich-kopf { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.pfeile, .eintrag-werkzeug { display: flex; gap: 6px; align-items: center; }
.pfeile form, .eintrag-werkzeug form, .vorlagen form { margin: 0; }
.eintrag-werkzeug { justify-content: flex-end; margin-top: 10px; }
.bearbeiten .eintrag { display: block; }
.bearbeiten .eintrag details > summary { display: flex; gap: 12px; align-items: center; cursor: pointer; list-style: none; }
.bearbeiten summary::-webkit-details-marker { display: none; }
.bearbeiten .eintrag.leer .eintrag-emoji { opacity: .55; }
.bearbeiten .eintrag.leer .eintrag-wert { font-weight: 400; color: var(--leise); font-size: .9rem; }
.stift { opacity: .5; }
.eintrag-form { margin-top: 10px; padding: 14px; border-radius: 16px; background: var(--hell); }
details.neu, details.bereich-werkzeug, details.vergessen { margin-top: 12px; }
details.neu > summary, details.bereich-werkzeug > summary, details.vergessen > summary, #einstellungen summary {
  cursor: pointer; font-weight: 600; color: var(--akzent-dunkel); padding: 6px 0;
}
details.bereich-werkzeug > summary { font-weight: 400; font-size: .9rem; color: var(--leise); }
details.bereich-werkzeug form { margin-top: 8px; }
.vorlagen { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.farben { display: flex; flex-wrap: wrap; gap: 8px; }
.farbe { display: inline-flex; gap: 6px; align-items: center; font-weight: 400 !important; margin: 0 !important;
  padding: 6px 12px; border-radius: 999px; background: var(--hell); border: 2px solid var(--linie); }
.farbe-zu { opacity: .55; }
.farbe::before { content: ""; width: 16px; height: 16px; border-radius: 50%; }
.farbe-rosa::before { background: #f47c7c; } .farbe-mint::before { background: #5fb89a; }
.farbe-himmel::before { background: #6fa8dc; } .farbe-sonne::before { background: #e6a817; }
.farbe-lavendel::before { background: #a68bd6; }
.emoji-wahl { display: flex; flex-wrap: wrap; gap: 4px; margin: 4px 0 2px; }
.emoji-wahl button { border: 0; background: #fff; border-radius: 10px; font-size: 1.2rem; width: 38px; height: 38px; cursor: pointer; }
.schritte-liste { padding-left: 1.2em; }
.schritte-liste li { margin-bottom: .6em; }

/* Einführung */
.einfuehrung {
  position: fixed; inset: 0; z-index: 50; background: rgba(74, 59, 59, .45);
  display: flex; align-items: flex-end; justify-content: center; padding: 16px;
}
.einfuehrung-karte { background: #fff; border-radius: var(--rund); padding: 24px; max-width: 460px; width: 100%; text-align: center; max-height: 90vh; overflow: auto; }
.schritte { list-style: none; margin: 0; padding: 0; }
.js .schritt { display: none; }
.js .schritt.aktiv { display: block; }
.schritt + .schritt { margin-top: 18px; }
.js .schritt + .schritt { margin-top: 0; }
.einfuehrung-knoepfe { display: flex; gap: 8px; justify-content: center; margin-top: 16px; }
@media (min-width: 600px) { .einfuehrung { align-items: center; } }

/* Fuß */
.fuss { text-align: center; padding: 24px 16px 32px; font-size: .85rem; color: var(--leise); display: flex; flex-direction: column; gap: 6px; }
.fuss a { color: var(--leise); }
.fuss-marke { text-decoration: none; }
.fuss-marke strong { color: var(--akzent-dunkel); }

/* Weitere SmaTags (Plan E7): Übersicht „Euer SmaTag", Teilen, Karte unten */
.euer-smatag h3 { margin: 18px 0 6px; color: var(--leise); font-weight: 600; }
.anhaenger-zeile { display: flex; gap: 16px; align-items: center; margin: 4px 0 10px; }
.anhaenger-bild {
  flex: 0 0 auto; width: 112px; height: 112px; object-fit: contain; border-radius: 18px;
  background: var(--hell); box-shadow: inset 0 0 0 2px var(--linie);
}
.anhaenger-leer { display: grid; place-items: center; font-size: 2.6rem; }
.anhaenger-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; overflow-wrap: anywhere; }
.anhaenger-text strong { font-family: "Sriracha", "Poppins", cursive; font-size: 1.35rem; color: var(--akzent-dunkel); line-height: 1.2; }
.wege { display: flex; flex-direction: column; gap: 10px; margin-top: 6px; }
.wege > .knopf, .weg > .knopf, .weg > summary.knopf { width: 100%; text-align: center; justify-content: center; }
.weg { margin: 0; }
.weg > .leise { display: block; text-align: center; margin-top: 2px; }
details.weg > summary { list-style: none; cursor: pointer; }
details.weg > summary::-webkit-details-marker { display: none; }
details.weg[open] > summary { box-shadow: inset 0 0 0 2px var(--akzent); background: var(--blase); }
details.weg > form, .teilen-box { margin-top: 10px; padding: 12px 14px; border-radius: 16px; background: var(--hell); }
.teilen-box { display: flex; flex-direction: column; gap: 8px; }
.teilen-box .knopf { text-align: center; }
.teilen-box .reihe { display: flex; gap: 6px; }
.teilen-link { flex: 1 1 auto; min-width: 0; font-size: .85rem; }
.zugang-liste { list-style: none; margin: 0; padding: 0; }
.zugang-liste li { display: flex; gap: 10px; align-items: center; justify-content: space-between; padding: 8px 0; border-top: 1px dashed var(--linie); }
.zugang-liste li > span { display: flex; flex-direction: column; min-width: 0; overflow-wrap: anywhere; }
.zugang-liste form { margin: 0; flex: 0 0 auto; }
.karte-schalter { display: flex; gap: 10px; align-items: center; justify-content: space-between; margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--linie); }
.karte-schalter .knopf { flex: 0 0 auto; }
.familie-hinweis { background: color-mix(in srgb, var(--gelb) 22%, white); }
.familie-hinweis h2 { color: var(--akzent-dunkel); }
.hinweis-wege { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.nachbestell-karte {
  display: flex; gap: 16px; align-items: center; margin-top: 26px;
  background: color-mix(in srgb, var(--blase) 55%, white); box-shadow: none;
}
.nachbestell-karte .anhaenger-bild { width: 92px; height: 92px; background: #fff; }
.nachbestell-karte p { margin: 0 0 8px; }
.nachbestell-titel { font-family: "Sriracha", "Poppins", cursive; font-size: 1.2rem; color: var(--akzent-dunkel); line-height: 1.25; }
@media (max-width: 380px) {
  .nachbestell-karte { flex-direction: column; text-align: center; }
  .karte-schalter { flex-direction: column; align-items: flex-start; }
}
