:root {
  --grund: #f3f4f6; --karte: #fff; --text: #1d2430; --leise: #5f6977; --linie: #dde1e7; --feld: #fbfbfc;
  --akzent: #223344; --akzent-text: #fff; --gold: #c9921f; --gold-grund: #fbf3e2;
  --gut: #1f7a4d; --gut-grund: #e7f5ee; --schlecht: #b42318; --schlecht-grund: #fdecea;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --grund: #111418; --karte: #1a1e24; --text: #e6e8eb; --leise: #9aa3ae; --linie: #2b313a; --feld: #14181d;
    --akzent: #e9b44c; --akzent-text: #15191e; --gold: #e9b44c; --gold-grund: #2e2614;
    --gut: #4cc38a; --gut-grund: #16301f; --schlecht: #f0776b; --schlecht-grund: #3b1f1c; color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--grund); color: var(--text); font: 17px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; }
a { color: inherit; }
h1 { font-size: 1.35rem; margin: .5rem 0 .2rem; line-height: 1.2; text-wrap: balance; }
h2 { font-size: 1.1rem; margin: 0 0 .6rem; }
p { margin: .3rem 0; }
.leise { color: var(--leise); }

.kopf { background: #464849; color: #fff; padding: calc(env(safe-area-inset-top, 0px) + 14px) 16px 18px; }
.kopf-innen { max-width: 640px; margin: 0 auto; }
.kopf p { opacity: .85; font-size: .95rem; }
.marke { display: flex; gap: .75rem; align-items: center; font-weight: 700; font-size: .95rem; letter-spacing: .04em; text-transform: uppercase; }
.marke .logo { width: 68px; height: 68px; border-radius: 8px; display: block; flex: none; }

main { max-width: 640px; margin: 0 auto; padding: 16px 16px 24px; display: grid; gap: 14px; }
.formular { display: grid; gap: 14px; }
.karte { background: var(--karte); border: 1px solid var(--linie); border-radius: 12px; padding: 16px; display: grid; gap: 12px; }
.hinweis { margin-top: 12px; }
.danke { border-color: var(--gut); background: var(--gut-grund); }
.danke h2 { color: var(--gut); }
.hilfe summary { font-weight: 700; cursor: pointer; }
.hilfe ul { margin: .6rem 0 0; padding-left: 1.2rem; display: grid; gap: .3rem; font-size: .95rem; }

label { display: grid; gap: .35rem; font-weight: 600; font-size: .95rem; }
input, textarea, select { font: inherit; font-weight: 400; color: var(--text); background: var(--feld); border: 1px solid var(--linie); border-radius: 8px; padding: .65rem .75rem; width: 100%; }
input:focus, textarea:focus, select:focus, button:focus-visible, .chip:focus-within, .ablage:focus-within { outline: 2px solid var(--gold); outline-offset: 2px; }
textarea { resize: vertical; }
.zwei { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 480px) { .zwei { grid-template-columns: 1fr; } }

fieldset.chips { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
fieldset.chips legend { font-weight: 600; font-size: .95rem; margin-bottom: .4rem; }
.chip { display: inline-flex; font-weight: 400; font-size: .92rem; cursor: pointer; }
.chip input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.chip span { border: 1px solid var(--linie); border-radius: 99px; padding: .4rem .8rem; background: var(--karte); }
.chip input:checked + span { background: var(--gold-grund); border-color: var(--gold); color: var(--text); font-weight: 600; }

.ablage { border: 2px dashed var(--linie); border-radius: 12px; padding: 20px 14px; text-align: center; justify-items: center; cursor: pointer; font-weight: 400; }
.ablage .plus { font-size: 2rem; line-height: 1; color: var(--gold); font-weight: 700; }
.ablage input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.vorschau { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; }
.vorschau:empty { display: none; }
.vorschau li { position: relative; border: 1px solid var(--linie); border-radius: 8px; overflow: hidden; background: var(--feld); aspect-ratio: 1; display: grid; place-items: center; font-size: .75rem; text-align: center; padding: 4px; word-break: break-all; }
.vorschau img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.vorschau button { position: absolute; top: 4px; right: 4px; width: 28px; height: 28px; border-radius: 50%; border: 0; background: rgba(0,0,0,.6); color: #fff; font-size: 1rem; cursor: pointer; z-index: 1; }

.haken { display: flex; gap: .6rem; align-items: flex-start; font-weight: 400; font-size: .92rem; }
.haken input { width: 1.3rem; height: 1.3rem; flex: none; margin-top: .15rem; accent-color: var(--akzent); }

.knopf { font: inherit; font-weight: 700; background: var(--akzent); color: var(--akzent-text); border: 0; border-radius: 10px; padding: .9rem 1.2rem; cursor: pointer; }
.knopf.gross { width: 100%; font-size: 1.05rem; padding: 1rem; }
.knopf:disabled { opacity: .55; cursor: default; }

.meldung { padding: .8rem 1rem; border-radius: 10px; }
.meldung.fehler { background: var(--schlecht-grund); color: var(--schlecht); }
.fortschritt { display: grid; gap: .4rem; }
.balken { height: 10px; background: var(--linie); border-radius: 99px; overflow: hidden; }
.balken span { display: block; height: 100%; width: 0; background: var(--gold); transition: width .2s; }

.fuss { max-width: 640px; margin: 0 auto; padding: 8px 16px calc(env(safe-area-inset-bottom, 0px) + 28px); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; font-size: .88rem; color: var(--leise); }
[hidden] { display: none !important; }
@media (prefers-reduced-motion: reduce) { .balken span { transition: none; } }
