/* Urkorb – Design D „Wie Handy-Startseite“ (Großer Umbau 28.10.2026, Maße/Farben/Schriften aus Vorlage-D-und-Liste.html)
 * Hintergrund #1F3A2E · Knopf-Flächen #2B4C3C · Akzent #E8B04A · Schrift #F2EEDF · Fraunces (Überschriften) + Work Sans (Text), offline vom Server.
 * Fraunces liegt in 500 und 700 vor; die Vorlage nennt 600 → der Browser nimmt die nächste Stärke (700).
 * Es gibt kein Rot und kein Gelb: nur GRÜN „Nehmen“ und NEUTRAL (grau/hell). */
@font-face { font-family: 'Fraunces'; font-weight: 500; font-display: swap; src: url('/fonts/fraunces-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: 'Fraunces'; font-weight: 700; font-display: swap; src: url('/fonts/fraunces-latin-700-normal.woff2') format('woff2'); }
@font-face { font-family: 'Work Sans'; font-weight: 400; font-display: swap; src: url('/fonts/work-sans-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'Work Sans'; font-weight: 500; font-display: swap; src: url('/fonts/work-sans-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: 'Work Sans'; font-weight: 600; font-display: swap; src: url('/fonts/work-sans-latin-600-normal.woff2') format('woff2'); }

:root {
  --grund: #1F3A2E; --flaeche: #2B4C3C; --linie: #3D6350; --schrift: #F2EEDF; --akzent: #E8B04A;
  --gedaempft: #C9D3C8; --gruen: #7FC77A; --neutral: #C9CFC6;
  --kopf: 'Fraunces', Georgia, serif; --text: 'Work Sans', system-ui, -apple-system, sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--grund); color: var(--schrift); font-family: var(--text); font-size: 16px; line-height: 1.4; }
body { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
button, input, select, textarea { font-family: inherit; font-size: 16px; color: inherit; }
a { color: var(--schrift); }
h1, h2, h3 { font-family: var(--kopf); margin: 0; font-weight: 600; }
.t { font-family: var(--kopf); font-weight: 600; margin: 0; }
h2 { font-size: 22px; }

#app { flex: 1; display: flex; flex-direction: column; padding-top: env(safe-area-inset-top); }
main { flex: 1; padding: 8px 20px calc(28px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 14px; max-width: 640px; width: 100%; margin: 0 auto; }
main.mitte { align-items: stretch; text-align: center; padding-top: 40px; }
.logo { border-radius: 28px; align-self: center; }
.t.gross { font-size: 30px; }

/* Startseite */
.startkopf { position: relative; padding: 28px 20px 0; max-width: 640px; width: 100%; margin: 0 auto; }
.startkopf .marke { font-size: 30px; text-align: center; }
.startkopf .symbolknopf { position: absolute; right: 14px; top: 20px; }
.scanknopf { align-self: center; width: 190px; height: 190px; border-radius: 50%; border: 6px solid var(--flaeche); outline: 2px solid var(--akzent);
  background: var(--akzent); color: var(--grund); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  font-family: var(--kopf); font-size: 26px; font-weight: 600; text-decoration: none; margin: 8px 0 10px; cursor: pointer; }
.scanknopf svg { width: 56px; height: 56px; }
.scanknopf:active { transform: scale(0.98); }

/* Runde Knöpfe (3 nebeneinander, A–Z) */
.raster { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 22px; column-gap: 8px; margin-top: 10px; }
.raster.start > .app:nth-child(3n+1):last-child { grid-column: 2; }
.app { border: none; background: transparent; display: flex; flex-direction: column; align-items: center; gap: 8px; color: var(--schrift);
  font-size: 16px; font-weight: 500; padding: 0; text-decoration: none; cursor: pointer; text-align: center; min-height: 44px; }
.appname { line-height: 1.2; overflow-wrap: anywhere; }
.ring { width: 84px; height: 84px; border-radius: 50%; background: var(--flaeche); border: 2px solid var(--akzent); display: flex; align-items: center; justify-content: center; flex: none; }
.ring svg { width: 38px; height: 38px; stroke: var(--schrift); }
.ring.klein { width: 64px; height: 64px; }
.ring.klein svg { width: 30px; height: 30px; }

/* Kopf innen: oben links großer Zurück-Knopf, darunter Bild + Titel */
.kopf { display: flex; flex-direction: column; gap: 14px; padding: 28px 20px 6px; max-width: 640px; width: 100%; margin: 0 auto; }
.zurueck { align-self: flex-start; height: 48px; padding: 0 18px 0 10px; border-radius: 24px; border: 1px solid var(--linie); background: var(--flaeche); color: var(--schrift);
  font-size: 17px; font-weight: 500; display: inline-flex; align-items: center; gap: 6px; text-decoration: none; cursor: pointer; }
.zurueck svg { width: 24px; height: 24px; }
.titelzeile { display: flex; align-items: center; gap: 14px; }
.titelzeile .t { font-size: 32px; line-height: 1.1; overflow-wrap: anywhere; min-width: 0; }
/* Vorlage D: Seite mit Bild + Unterknöpfen 34px, Listen-Seite 32px */
.titelzeile .ring.klein + .t { font-size: 34px; }
main > .raster:first-child { margin-top: 16px; }
.symbolknopf { width: 48px; height: 48px; display: inline-flex; align-items: center; justify-content: center; border: 0; background: transparent; border-radius: 24px; cursor: pointer; flex: none; color: var(--schrift); }
.symbolknopf svg { width: 26px; height: 26px; }

.status { margin: 6px 20px 0; padding: 8px 12px; border-radius: 12px; background: var(--flaeche); color: var(--gedaempft); font-size: 14px; max-width: 600px; }
.status.warnung { border: 2px solid var(--akzent); color: var(--schrift); }

/* Liste GRÜN / NEUTRAL */
.liste { display: flex; flex-direction: column; gap: 10px; }
.grp { display: flex; align-items: center; gap: 10px; font-family: var(--kopf); font-size: 20px; font-weight: 600; margin: 6px 0 0; }
.dot { width: 20px; height: 20px; border-radius: 50%; display: inline-block; flex: none; }
.dot-gruen { background: var(--gruen); }
.dot-neutral { background: var(--neutral); }
.item { background: var(--flaeche); border-radius: 16px; padding: 14px 16px; display: flex; flex-direction: row; gap: 12px; align-items: flex-start; text-decoration: none; color: var(--schrift); }
.item > .itemtext { display: flex; flex-direction: column; gap: 8px; min-width: 0; flex: 1; }
div.item:not(:has(.itemtext)), a.item:not(:has(.itemtext)) { flex-direction: column; gap: 8px; }
.name { font-size: 17px; font-weight: 500; margin: 0; overflow-wrap: anywhere; }
.res { margin: 0; font-size: 15px; color: var(--gedaempft); overflow-wrap: anywhere; }
.adm { margin: 0; font-size: 15px; color: var(--akzent); overflow-wrap: anywhere; }
.item.bald .name { font-family: var(--kopf); font-size: 20px; font-weight: 600; }
.zwischen { font-size: 20px; margin-top: 8px; }
.wahl { gap: 8px; }

/* Ergebnis beim Scannen */
.ergebnis { padding: 22px; border-radius: 22px; display: flex; flex-direction: column; gap: 6px; color: var(--grund); }
.ergebnis.gruen { background: var(--gruen); }
.ergebnis.neutral { background: var(--neutral); }
.ergebnis .wort { font-size: 15px; font-weight: 600; letter-spacing: 0.5px; }
.ergebnis .name { font-family: var(--kopf); font-size: 28px; font-weight: 600; line-height: 1.1; }

/* Karten (Wissen) */
.karte { padding: 14px 16px; border-radius: 16px; background: var(--flaeche); display: flex; flex-direction: column; gap: 6px; }
.karte.jetzt, .karte.hinweis { border: 2px solid var(--akzent); }
.etikett { font-size: 13px; color: var(--gedaempft); text-transform: uppercase; letter-spacing: 1px; }
.gedaempft { color: var(--gedaempft); }
.klein { font-size: 14px; }
.fett { font-weight: 600; }

/* Knöpfe – mindestens 44 px */
.knopf { min-height: 56px; border-radius: 16px; border: 0; background: var(--akzent); color: var(--grund); font-size: 17px; font-weight: 600; padding: 0 16px; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; text-align: center; }
.knopf svg { width: 24px; height: 24px; }
.knopf.hohl { background: var(--flaeche); color: var(--schrift); border: 1px solid var(--linie); }
.knopf.klein { min-height: 48px; font-size: 16px; border-radius: 14px; }
.knopf.text { background: transparent; color: var(--schrift); min-height: 44px; text-decoration: underline; padding: 0 8px; }
.knopf:disabled { opacity: 0.5; }
.reihe { display: flex; gap: 10px; flex-wrap: wrap; }
.reihe > .knopf { flex: 1 1 0; }
.stapel { display: flex; flex-direction: column; gap: 10px; }

/* Läden als Kacheln */
.kacheln { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.kachel { min-height: 64px; border-radius: 16px; background: var(--flaeche); color: var(--schrift); border: 2px solid var(--akzent); display: flex; align-items: center; justify-content: center;
  text-align: center; font-weight: 600; font-size: 17px; padding: 6px; cursor: pointer; overflow-wrap: anywhere; text-decoration: none; }

/* Listen (Einkauf) */
.zeile { min-height: 48px; display: flex; align-items: center; gap: 12px; padding: 6px 4px; border-bottom: 1px solid var(--linie); }
.zeile .t { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.zeile input[type=checkbox] { width: 26px; height: 26px; accent-color: var(--akzent); margin: 0; flex: none; }
.zeile.erledigt .t { text-decoration: line-through; color: var(--gedaempft); }
.unterhinweis { font-size: 14px; color: var(--gedaempft); display: block; }
.quelle { display: block; font-size: 13px; color: var(--gedaempft); font-weight: 400; margin-top: 2px; }
.markenwahl { min-height: 48px; border-radius: 12px; border: 0; background: var(--flaeche); color: var(--schrift); display: flex; align-items: center; justify-content: space-between;
  gap: 8px; padding: 0 12px; font-size: 16px; font-weight: 600; width: 100%; cursor: pointer; text-align: left; }

.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { min-height: 44px; padding: 0 16px; border-radius: 999px; background: transparent; color: var(--schrift); border: 2px solid var(--linie); font-size: 16px; font-weight: 600; cursor: pointer; }
.chip.an { background: var(--akzent); color: var(--grund); border-color: var(--akzent); }
.chip.gestrichelt { border-style: dashed; }

label.feld, div.feld { display: flex; flex-direction: column; gap: 6px; font-weight: 600; font-size: 15px; }
input[type=text], input[type=search], input[type=url], input[type=number], select, textarea {
  min-height: 48px; border-radius: 12px; border: 2px solid var(--linie); background: var(--flaeche); color: var(--schrift); padding: 10px 12px; width: 100%; }
textarea { min-height: 140px; resize: vertical; line-height: 1.4; }
input:focus, select:focus, textarea:focus, button:focus-visible, a:focus-visible, label:focus-within { outline: 3px solid var(--akzent); outline-offset: 2px; }
.haken { display: flex; align-items: center; gap: 12px; min-height: 44px; }
.haken input { width: 24px; height: 24px; accent-color: var(--akzent); }

/* Fotos (nur Verwalter) */
.fotos { display: flex; gap: 10px; flex-wrap: wrap; }
.foto { max-width: 100%; max-height: 260px; border-radius: 14px; object-fit: contain; align-self: center; }
.daumen { width: 64px; height: 64px; border-radius: 12px; object-fit: cover; flex: none; background: var(--grund); }
.daumen.gross { width: 140px; height: 140px; }

/* Kamera */
.kamera { position: relative; width: 100%; aspect-ratio: 3 / 4; max-height: 60vh; border-radius: 22px; overflow: hidden; background: #000; }
.kamera video { width: 100%; height: 100%; object-fit: cover; }
.kamera .rahmen { position: absolute; left: 10%; right: 10%; top: 38%; height: 24%; border: 3px solid var(--akzent); border-radius: 14px; box-shadow: 0 0 0 999px rgba(0,0,0,0.35); }
.vorschau { max-width: 100%; max-height: 240px; border-radius: 14px; object-fit: contain; align-self: center; }
.fortschritt { height: 8px; border-radius: 4px; background: var(--linie); overflow: hidden; }
.fortschritt > div { height: 100%; background: var(--akzent); width: 0; transition: width 0.2s; }

/* Dialog */
.schleier { position: fixed; inset: 0; background: rgba(0,0,0,0.55); display: flex; align-items: flex-end; justify-content: center; z-index: 50; }
.dialog { background: var(--grund); border-top: 2px solid var(--linie); border-radius: 22px 22px 0 0; width: 100%; max-width: 640px; max-height: 90vh; overflow: auto;
  padding: 20px 20px calc(20px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 12px; }
.meldung { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(30px + env(safe-area-inset-bottom)); background: var(--schrift); color: var(--grund);
  padding: 12px 18px; border-radius: 14px; font-weight: 600; z-index: 60; max-width: calc(100% - 32px); box-shadow: 0 8px 24px rgba(0,0,0,0.35); }
details { background: var(--flaeche); border-radius: 14px; padding: 4px 14px; }
details > summary { min-height: 44px; display: flex; align-items: center; cursor: pointer; font-weight: 600; }
.leer { color: var(--gedaempft); padding: 8px 0; margin: 0; }
.ab { margin-top: 8px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
