/* Casa Uschi – Plakat A2 (Philipp, 18.10.2026). Keine style-Attribute (CSP) – alles über Klassen.
   Lehren aus Walter: Felder ≥ 16 px, festes Gerüst, Leiste neben dem Inhalt, nichts läuft seitlich aus dem Bild. */

@font-face { font-family: "Alfa Slab One"; src: url("/statisch/schriften/alfa.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "Karla"; src: url("/statisch/schriften/karla.woff2") format("woff2"); font-weight: 400 800; font-display: swap; }

:root {
  --sand: #FFF6E3;
  --tinte: #22303A;
  --grau: #5C6A73;
  --sonne: #D9502F;
  --petrol: #1C7C8C;
  --salbei: #5E8A6F;
  --ocker: #F0C27B;
  --gelb: #F4D58D;
  --hell: #F4E2BC;
  --linie: #E0CFA8;
  --leiste: 74px;
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font-family: "Karla", system-ui, sans-serif;
  color: var(--tinte);
  background: var(--sand);
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
  overflow: hidden;
}
button, input, select, textarea { font: inherit; color: inherit; }
input, select, textarea { font-size: max(16px, 1em); }
button { cursor: pointer; }
[hidden] { display: none !important; }
.slab { font-family: "Alfa Slab One", Georgia, serif; font-weight: 400; }

/* --- Tor (Anmeldung) --- */
.tor { min-height: 100dvh; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 14px; padding: 32px 20px; text-align: center; overflow-y: auto; }
.tor-wort { font-family: "Alfa Slab One", serif; font-size: 40px; line-height: 1; }
.tor-unter { font-family: "Alfa Slab One", serif; font-size: 18px; color: var(--petrol); }
.tor-text { max-width: 320px; line-height: 1.45; }
.fehler { color: var(--sonne); font-weight: 800; min-height: 1.2em; }
.tor-code { width: 100%; max-width: 320px; display: flex; flex-direction: column; gap: 8px; padding-top: 14px;
  border-top: 2px dotted var(--linie); }
.tor-code-name { font-weight: 800; font-size: 14px; }
.tor-code input { border: 2px solid var(--tinte); border-radius: 12px; padding: 12px; background: #fff; text-align: center;
  letter-spacing: .08em; }

/* --- Gerüst: #app füllt den Bildschirm, nur <main> scrollt, die Leiste liegt darunter --- */
#app { position: fixed; inset: 0; display: flex; flex-direction: column; }
.inhalt { flex: 1; min-height: 0; width: 100%; overflow-y: auto; overflow-x: hidden; -webkit-overflow-scrolling: touch;
  outline: none; padding-bottom: 24px; }
.inhalt > * { max-width: 560px; margin-left: auto; margin-right: auto; }
.leiste { flex: none; display: flex; background: var(--sand); border-top: 2px solid var(--tinte);
  padding: 6px 4px calc(8px + env(safe-area-inset-bottom)); }
body.tippt .leiste { display: none; }
.leiste-knopf { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 3px; background: none;
  border: 0; font-size: 11px; font-weight: 800; color: #6B7780; padding: 2px 0; }
.leiste-knopf svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.leiste-ic { width: 40px; height: 28px; border-radius: 999px; display: flex; align-items: center; justify-content: center; }
.leiste-knopf.an { color: var(--tinte); }
.leiste-knopf.an .leiste-ic { background: var(--tinte); color: var(--sand); }

/* --- Start: Plakat --- */
.plakat { position: relative; width: 100%; max-width: 560px; }
.plakat svg.bild { display: block; width: 100%; height: auto; }
.plakat-kopf { position: absolute; top: calc(18px + env(safe-area-inset-top)); left: 22px; right: 70px; }
.plakat-zeile { font-size: 12px; font-weight: 800; letter-spacing: .18em; }
.plakat-wort { font-family: "Alfa Slab One", serif; font-size: clamp(30px, 10.2vw, 50px); line-height: .95; }
.plakat-ort { font-family: "Alfa Slab One", serif; font-size: clamp(17px, 5.4vw, 24px); color: var(--petrol); }
.zahnrad { position: absolute; top: calc(16px + env(safe-area-inset-top)); right: 14px; width: 44px; height: 44px;
  border-radius: 50%; border: 2px solid var(--tinte); background: var(--sand); display: flex; align-items: center; justify-content: center; }
.zahnrad svg { width: 22px; height: 22px; fill: none; stroke: var(--tinte); stroke-width: 2; }
.countdown { margin-top: 10px; background: var(--tinte); color: var(--sand); border: 0; border-radius: 12px;
  padding: 9px 14px; display: flex; flex-direction: column; align-items: flex-start; transform: rotate(-3deg); text-align: left; }
.countdown-klein { font-size: 11px; font-weight: 800; letter-spacing: .1em; }
.countdown-gross { font-family: "Alfa Slab One", serif; font-size: 28px; line-height: 1; }
.countdown-datum { font-size: 12px; font-weight: 700; color: var(--gelb); margin-top: 3px; }
.faehre { animation: schaukeln 3s ease-in-out infinite; transform-box: fill-box; transform-origin: 50% 90%; }
@keyframes schaukeln { 0%, 100% { transform: translateY(0) rotate(-2deg); } 50% { transform: translateY(-2px) rotate(2deg); } }
@media (prefers-reduced-motion: reduce) { .faehre { animation: none; } }

.block { padding: 14px 16px 0; display: flex; flex-direction: column; gap: 12px; }
.naechstes { width: 100%; background: #fff; border: 2px solid var(--tinte); border-radius: 14px; padding: 12px 14px;
  display: flex; justify-content: space-between; align-items: center; gap: 10px; text-align: left; }
.naechstes-klein { font-size: 12px; font-weight: 800; color: var(--sonne); }
.naechstes-text { font-size: 16px; font-weight: 800; line-height: 1.25; }
.pfeil { font-family: "Alfa Slab One", serif; font-size: 22px; flex: none; }
.stempel-reihe { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.stempel { border: 0; border-radius: 14px; padding: 12px 4px; display: flex; flex-direction: column; align-items: center; gap: 3px;
  color: #fff; min-width: 0; }
.stempel-zahl { font-family: "Alfa Slab One", serif; font-size: 22px; line-height: 1.1; }
.stempel-wort { font-size: 12px; font-weight: 700; }
.st-petrol { background: var(--petrol); }
.st-sonne { background: var(--sonne); }
.st-salbei { background: var(--salbei); }
.st-ocker { background: var(--ocker); color: var(--tinte); }
.weitere { font-size: 13px; color: var(--grau); }

/* --- Kopf der Unterseiten --- */
.kopf { position: relative; overflow: hidden; color: var(--sand); padding: calc(22px + env(safe-area-inset-top)) 18px 16px; }
.kopf-petrol { background: var(--petrol); }
.kopf-sonne { background: var(--sonne); }
.kopf-salbei { background: var(--salbei); }
.kopf-tinte { background: var(--tinte); }
.kopf-kreis { position: absolute; right: 18px; top: calc(18px + env(safe-area-inset-top)); width: 64px; height: 64px; border-radius: 50%;
  background: var(--sonne); opacity: .9; }
.kopf-petrol .kopf-kreis { background: var(--sonne); }
.kopf-sonne .kopf-kreis { background: var(--gelb); }
.kopf-text { position: relative; display: flex; flex-direction: column; gap: 3px; padding-right: 80px; }
.kopf-zeile { font-size: 12px; font-weight: 800; letter-spacing: .18em; }
.kopf-titel { font-family: "Alfa Slab One", serif; font-size: 34px; line-height: 1.05; overflow-wrap: anywhere; }
.kopf-unter { font-size: 13px; }
.zurueck { background: none; border: 0; color: var(--sand); font-weight: 700; padding: 0 0 6px; align-self: flex-start; font-size: 15px; }

/* --- Chips --- */
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chips-zeile { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
.chips-zeile::-webkit-scrollbar { display: none; }
.chip { flex: none; font-size: 13px; font-weight: 800; padding: 7px 11px; border-radius: 999px; border: 2px solid var(--tinte);
  background: var(--sand); color: var(--tinte); }
.chip.an { background: var(--tinte); color: var(--sand); }
.chip-klein { flex: none; font-size: 12px; font-weight: 700; padding: 5px 10px; border-radius: 999px; background: var(--hell);
  color: #5C4A20; border: 0; }
.chip-klein.an { background: var(--tinte); color: var(--sand); }
.chip-neu { background: none; border: 1.5px dashed #B8AE98; color: var(--grau); }

/* --- Listen --- */
.gruppe-kopf { display: flex; justify-content: space-between; align-items: baseline; padding: 16px 0 6px;
  border-bottom: 2px solid var(--tinte); }
.gruppe-name { font-family: "Alfa Slab One", serif; font-size: 18px; }
.gruppe-zahl { font-size: 13px; font-weight: 800; color: var(--grau); }
.zeile { display: grid; grid-template-columns: 44px minmax(0, 1fr); align-items: start; border-bottom: 2px dotted var(--linie);
  background: var(--sand); }
.haken { width: 44px; height: 44px; border: 0; background: none; display: flex; align-items: center; justify-content: center; padding: 0; }
.haken span { width: 22px; height: 22px; border-radius: 7px; border: 2.5px solid var(--tinte); display: flex; align-items: center; justify-content: center; }
.haken.rot span { border-color: var(--sonne); }
.haken.an span { background: var(--tinte); }
.haken svg { width: 14px; height: 14px; fill: none; stroke: var(--sand); stroke-width: 3; }
.zeile-text { background: none; border: 0; text-align: left; padding: 11px 4px 11px 0; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.zeile-titel { font-size: 15px; font-weight: 800; line-height: 1.3; overflow-wrap: anywhere; }
.zeile-meta { font-size: 12px; color: var(--grau); overflow-wrap: anywhere; }
.zeile.erledigt .zeile-titel { text-decoration: line-through; color: #8A8F95; }
.marke { font-size: 11px; font-weight: 800; color: var(--sonne); }

.leer { margin: 16px; padding: 18px; border: 2px dashed #B8AE98; border-radius: 16px; display: flex; flex-direction: column; gap: 8px;
  text-align: center; align-items: center; }
.leer-titel { font-family: "Alfa Slab One", serif; font-size: 18px; }
.leer-text { color: var(--grau); line-height: 1.4; }

.knopf { border: 0; border-radius: 14px; padding: 15px 18px; font-family: "Alfa Slab One", serif; font-size: 17px; }
.knopf-sonne { background: var(--sonne); color: #fff; }
.knopf-tinte { background: var(--tinte); color: var(--sand); }
.knopf-leer { background: none; border: 2px solid var(--tinte); color: var(--tinte); }
.knopf-breit { width: 100%; }
.knopf-klein { padding: 10px 14px; font-size: 14px; }
.knopf-rot { background: none; border: 2px solid var(--sonne); color: var(--sonne); }

.karte { background: #fff; border-radius: 14px; padding: 12px 14px; display: flex; justify-content: space-between; align-items: center;
  gap: 10px; border: 0; width: 100%; text-align: left; }
.karte-titel { font-weight: 800; font-size: 16px; }
.karte-unter { font-size: 12px; color: var(--grau); }
.abschnitt { font-family: "Alfa Slab One", serif; font-size: 18px; padding-top: 6px; }

.neu-zeile { display: flex; gap: 8px; padding: 10px 0; }
.neu-zeile input { flex: 1; min-width: 0; border: 2px solid var(--tinte); border-radius: 12px; padding: 10px 12px; background: #fff; }

/* --- Wischen --- */
.wisch { position: relative; overflow: hidden; }
.wisch-hinter { position: absolute; inset: 0; display: flex; justify-content: flex-end; background: var(--sonne); }
.wisch-knopf { width: 110px; border: 0; background: var(--sonne); color: #fff; font-weight: 800; }
.wisch-vorn { position: relative; transition: transform .18s ease; touch-action: pan-y; }
.wisch-vorn.zieht { transition: none; }

/* --- Blatt (Bearbeiten) --- */
.blatt-grund { position: fixed; inset: 0; background: rgba(34, 48, 58, .45); z-index: 20; }
.blatt { position: fixed; left: 0; right: 0; bottom: 0; max-height: 92dvh; z-index: 21; background: var(--sand);
  border-radius: 20px 20px 0 0; border-top: 2px solid var(--tinte); display: flex; flex-direction: column; max-width: 560px; margin: 0 auto; }
.blatt-kopf { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px 6px; gap: 10px; }
.blatt-titel { margin: 0; font-family: "Alfa Slab One", serif; font-weight: 400; font-size: 22px; min-width: 0; overflow-wrap: anywhere; }
.blatt-zu { width: 44px; height: 44px; border-radius: 50%; border: 2px solid var(--tinte); background: none; font-size: 18px; flex: none; }
.blatt-inhalt { overflow-y: auto; padding: 4px 16px calc(20px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 14px; }
.feld { display: flex; flex-direction: column; gap: 6px; }
.feld-name { font-size: 13px; font-weight: 800; color: var(--grau); }
.feld input[type=text], .feld input[type=date], .feld textarea { width: 100%; border: 2px solid var(--tinte); border-radius: 12px;
  padding: 10px 12px; background: #fff; }
.feld textarea { min-height: 70px; resize: vertical; }
.feld-reihe { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.schalter { display: flex; gap: 10px; align-items: center; font-weight: 700; }
.schalter input { width: 22px; height: 22px; accent-color: var(--tinte); }
.knopf-reihe { display: flex; gap: 10px; flex-wrap: wrap; }
.knopf-reihe .knopf { flex: 1; }
.ordnung-zeile { display: grid; grid-template-columns: minmax(0, 1fr) 44px 44px 44px; gap: 6px; align-items: center; }
.ordnung-zeile input { border: 2px solid var(--tinte); border-radius: 12px; padding: 9px 10px; background: #fff; min-width: 0; }
.mini { width: 44px; height: 44px; border-radius: 12px; border: 2px solid var(--tinte); background: none; font-weight: 800; }
.mini-rot { border-color: var(--sonne); color: var(--sonne); }
.hinweis-text { font-size: 13px; color: var(--grau); line-height: 1.4; }

/* --- Hinweis mit Rückgängig --- */
.hinweis { position: fixed; left: 12px; right: 12px; top: calc(12px + env(safe-area-inset-top)); z-index: 30;
  box-shadow: 0 6px 18px rgba(34, 48, 58, .25);
  background: var(--tinte); color: var(--sand); border-radius: 14px; padding: 12px 14px; display: flex; gap: 12px; align-items: center;
  justify-content: space-between; max-width: 536px; margin: 0 auto; }
.hinweis button { background: none; border: 0; color: var(--gelb); font-weight: 800; padding: 6px 4px; }

/* --- Sortieren (Stufe 2) --- */
.unsichtbar { position: fixed; left: 0; top: 0; width: 1px; height: 1px; opacity: 0; pointer-events: none; overflow: hidden; }
label.knopf { display: inline-flex; align-items: center; justify-content: center; text-align: center; cursor: pointer; }
.knopf[disabled] { opacity: .45; }
.teil-zeile { width: 100%; display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; gap: 12px; align-items: center;
  padding: 10px 0; border: 0; border-bottom: 2px dotted var(--linie); background: var(--sand); text-align: left; }
.teil-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.mini-bild { width: 56px; height: 56px; border-radius: 10px; object-fit: cover; background: var(--hell); display: block; }
.mini-leer { display: flex; align-items: center; justify-content: center; font-family: "Alfa Slab One", serif; color: #9A8E78; }
.ziel-marke { font-size: 11px; font-weight: 800; padding: 5px 9px; border-radius: 999px; white-space: nowrap; max-width: 110px;
  overflow: hidden; text-overflow: ellipsis; }
.ziel-offen { background: none; border: 1.5px dashed #B8AE98; color: var(--grau); }
.punkt { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; vertical-align: middle; }
.zf-petrol { background: var(--petrol); color: #fff; }
.zf-sonne { background: var(--sonne); color: #fff; }
.zf-salbei { background: var(--salbei); color: #fff; }
.zf-ocker { background: var(--ocker); color: var(--tinte); }
.zf-lila { background: #6E5BB8; color: #fff; }
.zf-rose { background: #E890A8; color: var(--tinte); }
.zf-tinte { background: var(--tinte); color: var(--sand); }
.zf-grau { background: #8A857C; color: #fff; }
.foto-reihe { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; }
.foto-reihe::-webkit-scrollbar { display: none; }
.foto-klein { width: 84px; height: 84px; border-radius: 10px; object-fit: cover; flex: none; }
.foto-gross { width: 240px; max-width: 80vw; height: 240px; border-radius: 12px; object-fit: cover; flex: none; }
.durch-bild { width: 100%; height: min(260px, 30vh); border-radius: 16px; object-fit: cover; background: var(--hell); display: block; }
.durch-leer { display: flex; align-items: center; justify-content: center; color: var(--grau); }
.durch-titel { font-family: "Alfa Slab One", serif; font-size: 22px; line-height: 1.15; overflow-wrap: anywhere; }
.ziel-raster { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.ziel-knopf { border: 0; border-radius: 14px; padding: 16px 8px; font-weight: 800; font-size: 16px; min-height: 56px; overflow-wrap: anywhere; }
.farb-wahl { margin: -2px 0 6px; }
.farbe { width: 34px; height: 34px; border-radius: 50%; border: 2px solid transparent; padding: 0; }
.farbe.an { border-color: var(--tinte); box-shadow: 0 0 0 2px var(--sand) inset; }

/* --- Umschalter Umzugskisten | Packlisten --- */
.umschalter { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; border: 2px solid var(--tinte); border-radius: 14px; }
.umschalt { border: 0; border-radius: 10px; padding: 10px 6px; font-weight: 800; font-size: 15px; background: none; color: var(--tinte); }
.umschalt.an { background: var(--tinte); color: var(--sand); }

/* --- Umzugskisten, Wissen, Dokumente (Stufe 3) --- */
.umschalter-drei { grid-template-columns: repeat(3, minmax(0, 1fr)); }
a.knopf { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; text-align: center; }
.kiste-karte { width: 100%; display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: 12px; align-items: center;
  padding: 10px 0; border: 0; border-bottom: 2px dotted var(--linie); background: var(--sand); text-align: left; }
.kiste-nr { font-family: "Alfa Slab One", serif; font-size: 30px; line-height: 1; text-align: center; background: #fff;
  border: 2px solid var(--tinte); border-radius: 12px; padding: 10px 0; }
.stand-marke { font-size: 11px; font-weight: 800; padding: 5px 9px; border-radius: 999px; white-space: nowrap; }
.stand-offen { background: none; border: 1.5px dashed #B8AE98; color: var(--grau); }
.stand-zu { background: var(--salbei); color: #fff; }
.stand-angekommen { background: var(--petrol); color: #fff; }
.nr-form { display: flex; gap: 6px; flex: 1; min-width: 0; }
.nr-form input { width: 76px; min-width: 0; flex: 1; border: 2px solid var(--tinte); border-radius: 12px; padding: 9px 10px; background: #fff; text-align: center; }
.suche { width: 100%; border: 2px solid var(--tinte); border-radius: 12px; padding: 11px 12px; background: #fff; }
.wissen-karte { width: 100%; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: center;
  padding: 12px 0; border: 0; border-bottom: 2px dotted var(--linie); background: var(--sand); text-align: left; }
.sicher { font-family: "Alfa Slab One", serif; font-size: 13px; width: 30px; height: 30px; border-radius: 50%; display: flex;
  align-items: center; justify-content: center; }
.sicher-H { background: var(--petrol); color: #fff; }
.sicher-M { background: var(--ocker); color: var(--tinte); }
.sicher-N { background: none; border: 2px dashed var(--sonne); color: var(--sonne); }
.wissen-text { white-space: pre-line; line-height: 1.5; font-size: 16px; overflow-wrap: anywhere; }
.feld textarea.lang { min-height: 160px; }
.dok-zeile { display: grid; grid-template-columns: minmax(0, 1fr) 44px; gap: 8px; align-items: center; }
.dok { color: var(--petrol); font-weight: 800; overflow-wrap: anywhere; padding: 8px 0; }
