/* Tandu Web: Signalgelb #FFE14D und Schwarz #111111, dazu Weiß und Creme, Archivo (Black, ExtraBold, Regular).
   Gleiche Bausteine wie die App: ein Seitenkopf, zwei Kartenstile (schwarz = Hauptkarte, creme = Nebenkarte), drei
   Knopfstufen (schwarze Pille, Kontur-Pille, Textlink), Marker-Avatar mit Initiale, eigene Icons als <img>.
   Mobil zuerst (390 px), hell und dunkel über prefers-color-scheme; jedes Text-Paar ≥ 4,5:1 (Test in web.test.mjs).
   Mobile-native Grundlage: viewport-fit=cover + Safe Areas, kein Tap-Highlight, Eingaben ≥ 16 px, 100dvh, :hover nur mit
   Maus, Druck-Feedback über :active, Reduced Motion. Keine Inline-Styles (CSP style-src 'self'). */

@font-face { font-family: "Archivo"; src: url("/statisch/Archivo-Regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Archivo"; src: url("/statisch/Archivo-ExtraBold.ttf") format("truetype"); font-weight: 800; font-display: swap; }
@font-face { font-family: "Archivo"; src: url("/statisch/Archivo-Black.ttf") format("truetype"); font-weight: 900; font-display: swap; }

:root {
  --flaeche: #FFE14D;
  --blatt: #FFFBEA;
  --text: #111111;
  --leise: #524A1F;
  --hero: #111111;
  --karte: #111111;
  --auf-karte: #FFE14D;
  --auf-karte-leise: #C9BC80;
  --knopf: #111111;
  --auf-knopf: #FFE14D;
  --rahmen: #111111;
  --plus: #111111;
  --minus: #111111;
  --fehler: #B3261E;
  --trenner: rgba(17, 17, 17, 0.14);
  --gelb: #FFE14D;
  --schwarz: #111111;
  --ease: cubic-bezier(0.23, 1, 0.32, 1);
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --flaeche: #0F0F0F;
    --blatt: #2A2926;
    --text: #FFFBEA;
    --leise: #A8A398;
    --hero: #FFE14D;
    --karte: #1C1C1C;
    --auf-karte: #FFE14D;
    --auf-karte-leise: #C9BC80;
    --knopf: #FFE14D;
    --auf-knopf: #111111;
    --rahmen: #FFE14D;
    --plus: #FFE14D;
    --minus: #FF8A7A;
    --fehler: #FF8A7A;
    --trenner: rgba(255, 251, 234, 0.14);
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--flaeche);
  color: var(--text);
  font-family: "Archivo", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.4;
  -webkit-tap-highlight-color: transparent;
  -webkit-font-smoothing: antialiased;
}

.seite {
  max-width: 600px;
  margin: 0 auto;
  padding: max(16px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) 28px max(16px, env(safe-area-inset-left));
}

p, h1, h2, ul, figure { margin: 0; }
ul { padding: 0; list-style: none; }
a { color: inherit; }
button, a, label, summary { touch-action: manipulation; }
button, .knopf, .seg, .chip, .kat, .wahl, .kachel { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }
.nur-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
:focus-visible { outline: 3px solid var(--rahmen); outline-offset: 3px; }

/* ── Bilder: Marker-Icons ── */
.ico { display: block; width: 100%; height: auto; }
.klein-ico { width: 24px; height: 24px; }

/* ── Seitenkopf (ein Muster für alle Seiten) ── */
.seitenkopf { display: flex; flex-direction: column; gap: 8px; margin: 0 0 22px; }
.kopfzeile { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 48px; margin-bottom: 8px; }
.zurueck-knopf {
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  width: 48px; height: 48px; border: 2.5px solid var(--rahmen); border-radius: 50%; color: var(--text); text-decoration: none;
}
.pfeil { display: block; width: 12px; height: 12px; margin-left: 5px; border: solid currentColor; border-width: 0 0 3.5px 3.5px; transform: rotate(45deg); }
.chevron { display: block; flex: none; width: 10px; height: 10px; margin-right: 4px; border: solid currentColor; border-width: 3px 3px 0 0; transform: rotate(45deg); opacity: 0.7; }
.gruppe { font-weight: 800; font-size: 19px; line-height: 1.2; color: var(--leise); overflow-wrap: anywhere; }
.titel { font-weight: 900; font-size: 36px; line-height: 1.05; letter-spacing: -0.02em; overflow-wrap: anywhere; }
.unter { color: var(--leise); font-weight: 800; font-size: 17px; }
.leise { color: var(--leise); font-weight: 800; }
.unter.leer { margin: 24px 0; }
.zurueck { margin-bottom: 16px; }

.gruppenkopf { display: flex; align-items: center; gap: 16px; margin: 4px 0 18px; }
.gruppen-ico { width: 76px; height: 76px; flex: none; }
.gruppenkopf-text { min-width: 0; }
.gruppe-name { font-weight: 900; font-size: 32px; line-height: 1.05; letter-spacing: -0.02em; overflow-wrap: anywhere; }
.wer-kopf { display: flex; flex-direction: column; align-items: center; gap: 10px; margin: 8px 0 22px; text-align: center; }
.wer-kopf .gruppe-name { font-size: 36px; }
.gruppen-ico.riesig { width: 132px; height: 132px; }

/* ── Segment (Übersicht / Ausgaben, Vereinfacht / Direkt, Aufteilung) ── */
.segment, .seg-gruppe { display: flex; gap: 0; padding: 3px; margin: 0 0 22px; border: 2.5px solid var(--rahmen); border-radius: 999px; }
.seg, .seg-radio { position: relative; flex: 1; display: flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 12px; border-radius: 999px; font-weight: 800; font-size: 17px; text-align: center; text-decoration: none; cursor: pointer; transition: background-color 180ms var(--ease), color 180ms var(--ease); }
.seg.aktiv, .seg-radio:has(input:checked) { background: var(--knopf); color: var(--auf-knopf); }
.seg-radio input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
.seg-radio:has(input:focus-visible) { outline: 3px solid var(--rahmen); outline-offset: 3px; }
.seg-gruppe { margin-bottom: 14px; }

/* ── Hero ── */
.hero-block { margin: 6px 0 22px; }
.hero { display: flex; flex-direction: column; gap: 2px; font-weight: 900; }
.hero-wort { color: var(--leise); font-weight: 800; font-size: 20px; }
.hero-zahl { color: var(--hero); font-size: clamp(46px, 15vw, 72px); line-height: 1; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.hero-zahl.glatt { white-space: normal; }

/* ── Knöpfe: primär (schwarze Pille), sekundär (Kontur-Pille), tertiär (Textlink) ── */
.knopf {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 56px; padding: 0 26px; border: 2.5px solid var(--knopf); border-radius: 999px;
  background: var(--knopf); color: var(--auf-knopf);
  font: inherit; font-weight: 800; font-size: 18px; text-align: center; text-decoration: none; cursor: pointer;
  transition: transform 150ms var(--ease), opacity 150ms var(--ease);
}
.knopf.breit { width: 100%; }
.knopf.klein { min-height: 44px; padding: 0 18px; font-size: 16px; }
.knopf.zweit { background: transparent; color: var(--text); border-color: var(--rahmen); }
.karte .knopf { background: var(--auf-karte); color: var(--karte); border-color: var(--auf-karte); }
.link { color: var(--text); font-weight: 800; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px; cursor: pointer; }
.karte .link { color: var(--auf-karte); }
.link.mitte { display: block; text-align: center; padding: 12px 0; }
.aktionen { display: flex; flex-direction: column; gap: 12px; margin-bottom: 28px; }
.aktionen.reihe { flex-direction: row; }
.aktionen.reihe .knopf { flex: 1; padding: 0 10px; font-size: 16px; white-space: nowrap; }
.aktionen .link.mitte { padding: 4px 0; }
.mehr { margin-top: 14px; }
.nur-app { margin: 8px 0 20px; font-weight: 800; color: var(--leise); font-size: 16px; }
.nur-app .link { color: var(--text); }

.knopf:active, .kachel:active, .seg:active, .chip:active, .kat:active, .zurueck-knopf:active, .wahl:active { transform: scale(0.97); }
.link:active { opacity: 0.6; }
a.saldo:active, .zeile-link:active, a.ausgabe:active { opacity: 0.7; }
@media (hover: hover) and (pointer: fine) {
  .knopf:hover { opacity: 0.88; }
  .link:hover, .zeile-link:hover { text-decoration-thickness: 3px; }
  .kachel:hover, .kat:hover, .chip:hover, .wahl:hover { border-color: var(--text); }
  a.saldo:hover, a.ausgabe:hover { background: var(--trenner); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; scroll-behavior: auto !important; }
  .knopf:active, .kachel:active, .seg:active, .chip:active, .kat:active, .zurueck-knopf:active, .wahl:active { transform: none; }
}

/* ── Karten: Hauptkarte (schwarz) und Nebenkarte (creme) ── */
.block { margin-bottom: 24px; }
.block-titel { font-weight: 900; font-size: 22px; line-height: 1.15; margin-bottom: 10px; color: var(--text); }
.karte { background: var(--karte); color: var(--auf-karte); border-radius: 26px; padding: 4px 18px; }
.karte-neben { background: var(--blatt); color: var(--text); border-radius: 26px; padding: 4px 18px; }
.liste > li + li { border-top: 2px solid var(--trenner); }
.karte.liste > li + li { border-top-color: rgba(255, 225, 77, 0.2); }
.karte-neben.gesamt, .karte-neben.neu-hier, .karte-neben.keine-daten { padding: 16px 18px; }
.mehr-links { margin: 0 0 18px; }
.zeile-link { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 56px; font-weight: 800; text-decoration: none; }

.zeile { display: grid; grid-template-columns: 1fr auto; grid-template-areas: "text betrag" "knopf knopf"; align-items: center; column-gap: 12px; padding: 14px 0; }
.zeile-text { grid-area: text; font-weight: 800; overflow-wrap: anywhere; }
.zeile-betrag { grid-area: betrag; font-weight: 900; font-size: 20px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.zeile .knopf { grid-area: knopf; justify-self: start; margin-top: 10px; }
.karte .zeile:not(.meine) .zeile-text { color: var(--auf-karte-leise); }

/* ── Marker-Avatar: gelbe Füllung, schwarze Kontur mit Wackel-Optik, Initiale in Archivo Black ── */
.avatar {
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  width: 44px; height: 44px; border: 2.5px solid #111111; border-radius: 52% 48% 50% 50% / 49% 52% 48% 51%;
  background: #FFE14D; color: #111111; font-weight: 900; font-size: 20px; line-height: 1; transform: rotate(-3deg);
}
.avatar.klein { width: 36px; height: 36px; font-size: 16px; border-width: 2px; }
.avatar.gross { width: 76px; height: 76px; font-size: 36px; border-width: 3px; }

.saldo { display: grid; grid-template-columns: 44px 1fr auto 14px; align-items: center; column-gap: 12px; padding: 13px 0; color: inherit; text-decoration: none; }
.saldo-name { font-weight: 800; font-size: 19px; overflow-wrap: anywhere; }
.saldo-wert { text-align: right; }
.saldo-zahl { display: block; font-weight: 900; font-size: 19px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.saldo-zahl.plus { color: var(--plus); }
.saldo-zahl.minus { color: var(--minus); }
.karte .saldo-zahl.plus { color: var(--auf-karte); }
.karte .saldo-zahl.minus { color: #FF8A7A; }
.saldo-wort { display: block; color: var(--leise); font-weight: 800; font-size: 14px; }
.karte .saldo-wort, .karte .leise { color: var(--auf-karte-leise); }
.gesamt { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 24px; }
.gesamt-wort { font-weight: 800; color: var(--leise); }
.gesamt-zahl { font-weight: 900; font-size: 26px; white-space: nowrap; font-variant-numeric: tabular-nums; }

/* ── Ausgabenliste ── */
.tag { margin-bottom: 18px; }
.tag-titel { font-weight: 900; font-size: 20px; margin: 0 0 8px 4px; }
.ausgabe {
  display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; grid-template-areas: "ico titel betrag" "ico unter unter";
  column-gap: 12px; row-gap: 2px; align-items: center; padding: 12px 0; color: inherit; text-decoration: none;
}
.ausgabe-ico { grid-area: ico; width: 44px; align-self: start; }
.ausgabe-titel { grid-area: titel; font-weight: 800; font-size: 18px; line-height: 1.2; overflow-wrap: break-word; min-width: 0; }
.ausgabe-betrag { grid-area: betrag; font-weight: 900; white-space: nowrap; font-variant-numeric: tabular-nums; text-align: right; }
.ausgabe-unter { grid-area: unter; color: var(--leise); font-size: 15px; font-weight: 400; }
.ausgabe-wirkung { font-weight: 800; }
.ausgaben-schlicht .ausgabe-schlicht { display: grid; grid-template-columns: 1fr auto; grid-template-areas: "titel betrag" "unter unter"; column-gap: 12px; padding: 13px 0; }
.ausgaben-schlicht .ausgabe-schlicht .ausgabe-unter { grid-column: 1 / -1; }

.suche { display: flex; gap: 10px; margin: 0 0 20px; }
.suche .feld { flex: 1; min-width: 0; }

/* ── „Wer bist du?“ ── */
.wer .titel { text-align: center; }
.wer .unter { text-align: center; margin-top: 4px; }
.kacheln { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 22px 0 24px; }
.kachel {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  min-height: 150px; padding: 16px 10px; border: 2.5px solid var(--rahmen); border-radius: 26px;
  background: var(--blatt); color: var(--text); font: inherit; cursor: pointer;
  transition: transform 150ms var(--ease), border-color 150ms var(--ease);
}
.kachel-name { font-weight: 800; font-size: 20px; line-height: 1.15; text-align: center; max-width: 100%; overflow-wrap: anywhere; }
.neu-hier .block-titel { margin-bottom: 12px; }
.neu-form { display: flex; flex-direction: column; gap: 12px; }

/* ── Formulare ── */
.formular { display: flex; flex-direction: column; gap: 12px; }
.feld-name { font-weight: 800; color: var(--leise); font-size: 17px; }
.feld {
  width: 100%; min-height: 56px; padding: 0 18px; border: 2.5px solid var(--rahmen); border-radius: 20px;
  background: var(--blatt); color: var(--text); font: inherit; font-weight: 800; font-size: 18px; appearance: none; -webkit-appearance: none;
}
.feld.pin { letter-spacing: 0.3em; font-size: 30px; min-height: 64px; }
.feld.text { font-size: 18px; }
.feld::placeholder { color: var(--leise); opacity: 1; font-weight: 400; }
.feld[aria-invalid="true"] { border-color: var(--fehler); }
.feld:focus-visible { outline: 3px solid var(--rahmen); outline-offset: 2px; }
textarea.feld { padding: 14px 18px; min-height: 96px; resize: vertical; line-height: 1.35; font-weight: 400; }
input[type="search"].feld { -webkit-appearance: none; }
.fehlertext { color: var(--fehler); font-weight: 800; margin-bottom: 8px; }
.feld-gruppe { display: flex; flex-direction: column; gap: 8px; margin: 0 0 20px; padding: 0; border: 0; min-width: 0; }
.feld-gruppe > .fehlertext { margin: 0; }
legend.feld-name { padding: 0; margin-bottom: 8px; }
.betrag-zeile { position: relative; display: flex; align-items: center; }
.feld.betrag { font-size: 40px; font-weight: 900; min-height: 76px; padding-right: 120px; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.betrag-waehrung { position: absolute; right: 18px; display: flex; align-items: center; gap: 8px; font-weight: 900; font-size: 20px; color: var(--leise); pointer-events: none; }

/* Personen-Chips (Bezahlt von, Für wen) */
.wahlen { display: flex; flex-direction: row; flex-wrap: wrap; gap: 8px; }
.wahl {
  position: relative; display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 6px 14px 6px 8px;
  border: 2.5px solid var(--rahmen); border-radius: 999px; background: transparent; color: var(--text); cursor: pointer;
  transition: transform 150ms var(--ease), background-color 150ms var(--ease);
}
.wahl .avatar { width: 36px; height: 36px; font-size: 16px; border-width: 2px; }
.wahl-feld { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
.wahl-name { font-weight: 800; font-size: 17px; overflow-wrap: anywhere; }
.wahl-haken { display: none; }
.wahl:has(.wahl-feld:checked) { background: var(--knopf); color: var(--auf-knopf); border-color: var(--knopf); }
.wahl:has(.wahl-feld:focus-visible) { outline: 3px solid var(--rahmen); outline-offset: 3px; }
.wahl:has(.wahl-feld[type="checkbox"]:checked) .wahl-haken, .wahl:has(.wahl-feld[type="radio"]:checked) .wahl-haken { display: block; width: 16px; height: 9px; margin: -4px 2px 0 0; border: solid currentColor; border-width: 0 0 3.5px 3.5px; transform: rotate(-45deg); }

/* Aufteilung: Panel je Modus, nur mit CSS umgeschaltet */
.modus-panel { display: none; flex-direction: column; gap: 10px; }
.aufteilung:has(input[name="modus"][value="gleich"]:checked) .modus-gleich,
.aufteilung:has(input[name="modus"][value="betraege"]:checked) .modus-betraege,
.aufteilung:has(input[name="modus"][value="prozent"]:checked) .modus-prozent,
.aufteilung:has(input[name="modus"][value="anteile"]:checked) .modus-anteile { display: flex; }
@supports not selector(:has(*)) { .modus-panel, .datum-text { display: flex; } }
.panel-titel { font-weight: 800; color: var(--leise); }
.werte { display: flex; flex-direction: column; gap: 8px; }
.wert-zeile { display: grid; grid-template-columns: 44px 1fr 128px; align-items: center; gap: 12px; }
.wert-name { font-weight: 800; font-size: 18px; overflow-wrap: anywhere; }
.feld.wert { min-height: 52px; text-align: right; font-variant-numeric: tabular-nums; }

/* Kategorie: Icon-Raster */
.kat-raster { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; }
.kat {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 4px 8px;
  border: 2.5px solid transparent; border-radius: 20px; background: var(--blatt); cursor: pointer;
  transition: transform 150ms var(--ease), border-color 150ms var(--ease);
}
.kat-bild { width: 52px; }
.kat-name { font-weight: 800; font-size: 14px; text-align: center; line-height: 1.15; overflow-wrap: anywhere; }
.kat:has(.wahl-feld:checked) { border-color: var(--rahmen); }
.kat:has(.wahl-feld:focus-visible) { outline: 3px solid var(--rahmen); outline-offset: 3px; }
.kat-leer { display: flex; align-items: center; justify-content: center; height: 52px; font-weight: 900; font-size: 30px; color: var(--leise); }

/* Datum: Chips + Textfeld TT.MM.JJJJ */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  position: relative; display: inline-flex; align-items: center; min-height: 48px; padding: 0 18px; border: 2.5px solid var(--rahmen);
  border-radius: 999px; font-weight: 800; cursor: pointer; transition: transform 150ms var(--ease), background-color 150ms var(--ease);
}
.chip:has(.wahl-feld:checked) { background: var(--knopf); color: var(--auf-knopf); }
.chip:has(.wahl-feld:focus-visible) { outline: 3px solid var(--rahmen); outline-offset: 3px; }
.datum-text { display: none; max-width: 220px; }
.datum-gruppe:has(input[value="anderes"]:checked) .datum-text, .datum-gruppe:has(.fehlertext) .datum-text { display: block; }

.meldung { margin: 0 0 20px; padding: 14px 18px; border-radius: 20px; background: var(--karte); color: var(--auf-karte); font-weight: 800; }

/* ── Rechenweg: Rechnung als Karte ── */
.rechnung { display: flex; flex-direction: column; gap: 6px; padding: 18px 20px; margin-bottom: 22px; }
.rz { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.rz-wort { color: var(--auf-karte-leise); font-weight: 800; }
.rz-zahl { font-weight: 900; font-size: 24px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.rz-zahl.gross { font-size: 34px; letter-spacing: -0.02em; }
.rz .op { color: var(--auf-karte-leise); margin-right: 4px; }
.rz.ergebnis { margin-top: 6px; padding-top: 12px; border-top: 2px solid rgba(255, 225, 77, 0.3); }

/* ── Bezahlen ── */
.wege { display: flex; flex-direction: column; gap: 20px; margin-bottom: 30px; }
.wege .aktionen { margin-bottom: 0; }
.qr { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.qr-bild { width: min(100%, 300px); padding: 10px; border: 2.5px solid var(--rahmen); border-radius: 26px; background: #FFFFFF; }
.qr-svg { display: block; width: 100%; height: auto; }
.kopier-karte { padding: 4px 18px; }
.kopier-zeile { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 14px 0; }
.kopier-zeile + .kopier-zeile { border-top: 2px solid var(--trenner); }
.keine-daten .kopier-zeile { padding: 12px 0 0; align-items: stretch; }
.kopier-titel { color: var(--leise); font-weight: 800; font-size: 15px; overflow-wrap: break-word; max-width: 100%; }
.kopier-wert { font-weight: 900; font-size: 18px; line-height: 1.3; overflow-wrap: anywhere; max-width: 100%; user-select: all; -webkit-user-select: all; font-variant-numeric: tabular-nums; }
.kopieren { display: none; margin-top: 8px; }
.js .kopieren { display: inline-flex; }
.js .nur-ohne-js { display: none; }
.ohne-qr { font-size: 16px; }
.unter-titel { font-weight: 900; font-size: 24px; line-height: 1.1; margin-bottom: 8px; overflow-wrap: anywhere; }
.abstand { margin-bottom: 12px; }
.warnung { padding: 16px 18px; border: 2.5px solid var(--fehler); border-radius: 22px; background: var(--blatt); color: var(--text); }
.warnung-titel { font-weight: 900; font-size: 20px; line-height: 1.2; color: var(--fehler); }
.warnung-text { margin-top: 6px; font-weight: 800; font-size: 16px; }
.erledigt-block { padding-top: 22px; border-top: 2.5px solid var(--rahmen); }

/* ── Jeder wählt selbst (Bon-Runde) ── */
.wer-liste { margin-bottom: 14px; }
.gewaehlt { display: grid; grid-template-columns: 36px 1fr; grid-template-areas: "avatar name" "avatar was"; column-gap: 12px; align-items: center; padding: 12px 0; }
.gewaehlt .avatar { grid-area: avatar; }
.gewaehlt-name { grid-area: name; font-weight: 800; font-size: 18px; overflow-wrap: anywhere; }
.gewaehlt-was { grid-area: was; color: var(--leise); font-weight: 800; font-size: 15px; overflow-wrap: anywhere; }
.noch-nicht { margin-bottom: 22px; font-size: 16px; }
.hero-block.anteil { margin-top: 0; }
.gross-frage { color: var(--text); font-weight: 900; font-size: 24px; line-height: 1.15; }
.artikel-liste { gap: 10px; }
.artikel-liste > .unter { margin: -2px 0 4px; }
.wahl.artikel { display: grid; grid-template-columns: 1fr auto 30px; gap: 12px; width: 100%; min-height: 64px; padding: 12px 18px 12px 22px; border-radius: 24px; }
.wahl.artikel .wahl-haken { display: block; width: 26px; height: 26px; margin: 0; border: 2.5px solid currentColor; border-radius: 9px; transform: none; justify-self: end; }
.wahl.artikel:has(.wahl-feld:checked) .wahl-haken { background: var(--auf-knopf); border-color: var(--auf-knopf); box-shadow: inset 0 0 0 5px var(--knopf); }
.artikel-name { font-weight: 800; font-size: 19px; line-height: 1.2; overflow-wrap: anywhere; }
.artikel-preis { font-weight: 900; font-size: 18px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.artikel-zahl { display: grid; grid-template-columns: 1fr 104px; align-items: center; gap: 8px 14px; padding: 12px 12px 12px 22px; border: 2.5px solid var(--rahmen); border-radius: 24px; background: var(--blatt); color: var(--text); }
.artikel-zahl.mit-fehler { border-color: var(--fehler); }
.artikel-text { display: flex; flex-direction: column; gap: 2px; cursor: pointer; min-width: 0; }
.artikel-unter { color: var(--leise); font-weight: 800; font-size: 15px; }
.feld.stueck { min-height: 56px; padding: 0 8px; text-align: center; font-size: 26px; font-variant-numeric: tabular-nums; }
.artikel-zahl > .fehlertext { grid-column: 1 / -1; margin: 0; }
.zuschlaege { display: flex; flex-direction: column; gap: 10px; margin: -6px 0 22px; }
.zuschlag { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; color: var(--leise); font-weight: 800; font-size: 16px; }
.zuschlag-text { overflow-wrap: anywhere; }
.zuschlag-betrag { color: var(--text); font-weight: 900; white-space: nowrap; font-variant-numeric: tabular-nums; }
.bon-formular { margin-bottom: 30px; }
.bon-foto-link { display: block; }
.bon-foto { display: block; width: 100%; height: auto; border-radius: 26px; background: var(--blatt); }

/* ── Fehlerseiten ── */
.fehler-kopf { align-items: flex-start; margin-top: 8px; }
.fehler-ico { width: 104px; height: 104px; }
.fehler .titel { font-size: 34px; }

/* ── App-Leiste (wegklickbar) und Fußzeile ── */
.app-leiste {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 5; display: flex; align-items: center; gap: 10px;
  max-width: 600px; margin: 0 auto; padding: 10px 8px 10px 16px; padding-bottom: max(10px, env(safe-area-inset-bottom));
  background: var(--karte); color: var(--auf-karte); border-radius: 22px 22px 0 0;
}
.app-leiste-text { flex: 1; min-width: 0; font-weight: 800; font-size: 15px; line-height: 1.2; }
.app-leiste .knopf { flex: none; min-height: 40px; padding: 0 16px; font-size: 15px; background: var(--auf-karte); color: var(--karte); border-color: var(--auf-karte); }
.app-leiste-zu { display: flex; }
.icon-knopf { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border: 0; border-radius: 50%; background: transparent; color: inherit; font: inherit; font-size: 28px; line-height: 1; cursor: pointer; }
.mit-leiste .seite { padding-bottom: 28px; }
.mit-leiste .fuss { padding-bottom: calc(76px + env(safe-area-inset-bottom)); }

.fuss { display: flex; flex-wrap: wrap; gap: 8px 20px; max-width: 600px; margin: 0 auto; padding: 0 max(16px, env(safe-area-inset-left)) max(28px, env(safe-area-inset-bottom)); font-size: 15px; }
.fuss .link { font-weight: 800; text-decoration-thickness: 1.5px; }

/* ── Rechtstexte und Hilfe (gleicher Kopf wie die App-Seiten) ── */
.rechtstext { color: var(--text); }
.rechtstext .block-titel { font-size: 22px; margin: 28px 0 8px; scroll-margin-top: 16px; }
.rechtstext > p { margin-bottom: 16px; }
.rechtstext p, .rechtstext li { font-size: 17px; line-height: 1.5; overflow-wrap: anywhere; }
.rechtstext p + p, .rechtstext ul { margin-top: 10px; }
.rechtstext li + li { margin-top: 8px; }
.rechtstext ul { padding-left: 20px; list-style: disc; }
.inhalt { margin: 0 0 8px; padding: 14px 18px; background: var(--blatt); border-radius: 22px; }
.inhalt ol { margin: 0; padding-left: 22px; }
.inhalt li { padding: 3px 0; font-weight: 800; }
.faq { background: var(--blatt); border-radius: 22px; margin: 0 0 10px; padding: 0 18px; }
.faq summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 60px; font-weight: 800; font-size: 18px; cursor: pointer; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; flex: none; width: 10px; height: 10px; border: solid currentColor; border-width: 0 3px 3px 0; transform: rotate(45deg); transition: transform 180ms var(--ease); }
.faq[open] summary::after { transform: rotate(-135deg); }
.faq-text { padding: 0 0 16px; }
.faq-text p + p { margin-top: 10px; }
.entwurf { background: var(--knopf); color: var(--auf-knopf); border-radius: 16px; padding: 12px 18px; margin-bottom: 16px; font-weight: 800; }

@media (min-width: 760px) {
  body { font-size: 18px; }
  .seite { max-width: 640px; padding-top: max(40px, env(safe-area-inset-top)); }
  .titel { font-size: 44px; }
  .gruppe-name { font-size: 40px; }
  .gruppen-ico { width: 96px; height: 96px; }
  .app-leiste { border-radius: 22px; bottom: 16px; left: 16px; right: 16px; max-width: 568px; }
  .fuss { max-width: 640px; }
}
