/* Schlicht nach Apple-Art: Systemschrift, ruhige Flächen, klare Rangfolge, hell und dunkel.
   Alle Farben stehen hier oben als Variablen.
   Hausfarben von foodsafety-mai.de: das Gelb des Hakens für Hauptknöpfe, das Petrol für Schrift-Akzente
   (Gelb auf Weiß wäre als Schrift nicht lesbar). Im Dunkeln trägt das Gelb auch die Akzente. */
:root {
  color-scheme: light dark;
  --grund: #f2f2f7;
  --karte: #ffffff;
  --feld: #f0f0f5;
  --text: #111114;
  --text2: #5d5d66;
  --text3: #8a8a93;
  --linie: rgba(60, 60, 67, 0.14);
  --akzent: #215369;
  --akzent-zart: rgba(33, 83, 105, 0.09);
  --knopf: #ffcb05;
  --auf-knopf: #1f1a00;
  --marke-schatten: rgba(214, 160, 0, 0.3);
  --auf-farbe: #ffffff;
  --rot: #c9001a;
  --orange: #b54a00;
  --gelb: #8a6400;
  --gruen: #1a7a35;
  --leiste: rgba(242, 242, 247, 0.8);
  --schatten: 0 1px 2px rgba(0, 0, 0, 0.04), 0 6px 20px rgba(0, 0, 0, 0.04);
  --radius: 18px;
}
/* Dunkel: nach dem Gerät, solange in der App nicht „Hell“ gewählt ist … */
@media (prefers-color-scheme: dark) {
  :root:not([data-ansicht="hell"]) {
    --grund: #0b0b0d;
    --karte: #1a1a1d;
    --feld: #27272b;
    --text: #f5f5f7;
    --text2: #a9a9b2;
    --text3: #7c7c85;
    --linie: rgba(255, 255, 255, 0.1);
    --akzent: #ffcb05;
    --akzent-zart: rgba(255, 203, 5, 0.14);
    --knopf: #ffcb05;
    --marke-schatten: rgba(0, 0, 0, 0.4);
    --auf-farbe: #101013;
    --rot: #ff6b61;
    --orange: #ff9f45;
    --gelb: #ffd426;
    --gruen: #3ddc68;
    --leiste: rgba(11, 11, 13, 0.78);
    --schatten: 0 0 0 1px rgba(255, 255, 255, 0.06);
  }
}
/* … oder fest, wenn in der App „Dunkel“ gewählt ist. Beide Blöcke müssen gleich bleiben. */
:root[data-ansicht="dunkel"] {
  color-scheme: dark;
  --grund: #0b0b0d;
  --karte: #1a1a1d;
  --feld: #27272b;
  --text: #f5f5f7;
  --text2: #a9a9b2;
  --text3: #7c7c85;
  --linie: rgba(255, 255, 255, 0.1);
  --akzent: #ffcb05;
  --akzent-zart: rgba(255, 203, 5, 0.14);
  --knopf: #ffcb05;
  --marke-schatten: rgba(0, 0, 0, 0.4);
  --auf-farbe: #101013;
  --rot: #ff6b61;
  --orange: #ff9f45;
  --gelb: #ffd426;
  --gruen: #3ddc68;
  --leiste: rgba(11, 11, 13, 0.78);
  --schatten: 0 0 0 1px rgba(255, 255, 255, 0.06);
}
:root[data-ansicht="hell"] { color-scheme: light; }

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--grund);
  color: var(--text);
  font: 17px/1.4 -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}
[hidden] { display: none !important; }
a { color: var(--akzent); text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--akzent); outline-offset: 2px; }
.symbol { flex: none; display: block; }

/* --- Obere Leiste: Zurück links, Übertragungsstand rechts --- */
.leiste {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; gap: 12px;
  min-height: calc(56px + env(safe-area-inset-top));
  /* Seitlich so eingerückt, dass Zurück und Stand über der Inhaltsspalte stehen. */
  padding: env(safe-area-inset-top) max(20px, env(safe-area-inset-right), calc(50% - 370px)) 0 max(20px, env(safe-area-inset-left), calc(50% - 370px));
  background: var(--leiste);
  -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
}
.leiste .luecke { flex: 1; }
/* Marios Haken steht mittig in der Leiste, unabhängig von Zurück und Stand. */
.leiste .marke { position: absolute; left: 50%; bottom: 14px; height: 28px; width: auto; transform: translateX(-50%); pointer-events: none; }
#zurueck { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding-right: 12px; font-weight: 500; }
#zurueck::before {
  content: ""; width: 10px; height: 10px; margin-left: 3px;
  border-left: 2.5px solid currentColor; border-bottom: 2.5px solid currentColor; border-radius: 1px; transform: rotate(45deg);
}
#status {
  display: inline-flex; align-items: center; gap: 8px;
  border: 0; border-radius: 999px; padding: 7px 14px; min-height: 34px;
  background: var(--karte); color: var(--text2); font-size: 14px; font-weight: 600; box-shadow: var(--schatten);
}
#status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
#status.gut { color: var(--gruen); }
#status.offen { color: var(--orange); }
#status.fehler { color: var(--rot); }

/* Schalter für die dunkle Ansicht, klein rechts in der Leiste. Form wie die Schalter am iPhone, an = Hausgelb.
   Im Knopf ein Mond: grau, solange aus, dunkel, wenn an. */
#ansicht {
  flex: none; position: relative; width: 46px; height: 28px; padding: 0; border: 0; border-radius: 999px;
  background: rgba(120, 120, 128, 0.3);
}
#ansicht::before {
  content: ""; position: absolute; top: 2px; left: 2px; width: 24px; height: 24px; border-radius: 50%;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%239a9aa3' d='M20.5 14.2A8.6 8.6 0 0 1 9.8 3.5a8.6 8.6 0 1 0 10.7 10.7z'/%3E%3C/svg%3E") center / 14px no-repeat; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}
#ansicht::after { content: ""; position: absolute; inset: -8px; } /* größere Fläche zum Treffen */
#ansicht[aria-checked="true"] { background: var(--knopf); }
#ansicht[aria-checked="true"]::before { transform: translateX(18px); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%231f1a00' d='M20.5 14.2A8.6 8.6 0 0 1 9.8 3.5a8.6 8.6 0 1 0 10.7 10.7z'/%3E%3C/svg%3E"); }
@media (prefers-reduced-motion: no-preference) {
  #ansicht { transition: background-color 0.2s; }
  #ansicht::before { transition: transform 0.2s; }
}

/* --- Seite --- */
main {
  max-width: 780px; margin: 0 auto;
  padding: 0 max(20px, env(safe-area-inset-right)) calc(48px + env(safe-area-inset-bottom)) max(20px, env(safe-area-inset-left));
}
.seitenkopf { display: flex; align-items: flex-end; gap: 16px; margin: 6px 0 22px; }
.seitenkopf > div { flex: 1; min-width: 0; }
h1 { font-size: 34px; line-height: 1.12; font-weight: 750; letter-spacing: -0.02em; margin: 0; overflow-wrap: anywhere; }
.unterzeile { color: var(--text2); margin: 6px 0 0; }
h2 {
  font-size: 21px; line-height: 1.2; font-weight: 700; letter-spacing: -0.01em;
  margin: 32px 4px 12px; display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
h2 .zahl { color: var(--text3); font-weight: 600; margin-left: 8px; }
h2 > span { flex: 1; }
.fuss { color: var(--text2); font-size: 14px; margin: 10px 4px 0; }

.karte { background: var(--karte); border-radius: var(--radius); box-shadow: var(--schatten); overflow: hidden; }
.karte + .karte { margin-top: 14px; }
.karte.liste > * + * { border-top: 1px solid var(--linie); }

/* Leerer Zustand */
.leer { padding: 40px 24px; text-align: center; color: var(--text2); }
.leer .symbol { margin: 0 auto 12px; color: var(--text3); }
.leer strong { display: block; color: var(--text); font-size: 19px; margin-bottom: 4px; }

/* --- Formulare: Beschriftung über einem gut sichtbaren Feld --- */
.formular { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; padding: 18px; }
.formular > * { grid-column: 1 / -1; }
.formular > .halb { grid-column: auto; }
@media (max-width: 560px) { .formular > .halb { grid-column: 1 / -1; } }
.zeile { display: block; min-width: 0; }
.zeile > span { display: block; font-size: 14px; font-weight: 600; color: var(--text2); margin: 0 2px 7px; }
.zeile input, .zeile select, .zeile textarea {
  display: block; width: 100%; min-height: 48px; margin: 0; padding: 12px 14px;
  border: 1.5px solid transparent; border-radius: 12px; background: var(--feld);
  outline: none; resize: none; -webkit-appearance: none; appearance: none;
}
.zeile textarea { overflow: hidden; line-height: 1.4; }
.zeile select {
  padding-right: 40px;
  background-image: linear-gradient(45deg, transparent 50%, var(--text2) 50%), linear-gradient(135deg, var(--text2) 50%, transparent 50%);
  background-position: calc(100% - 21px) 21px, calc(100% - 15px) 21px; background-size: 6px 6px; background-repeat: no-repeat;
}
.zeile input:focus, .zeile select:focus, .zeile textarea:focus { border-color: var(--akzent); background-color: var(--karte); }
.zeile input::placeholder, .zeile textarea::placeholder { color: var(--text3); opacity: 1; }
.zeile:focus-within > span { color: var(--akzent); }

details > summary {
  list-style: none; display: flex; align-items: center; gap: 12px; padding: 16px 18px; cursor: pointer; min-height: 60px;
}
details > summary::-webkit-details-marker { display: none; }
details > summary .mitte { flex: 1; min-width: 0; }
details > summary .symbol.pfeil { color: var(--text3); transition: transform 0.2s; }
details[open] > summary .symbol.pfeil { transform: rotate(90deg); }
details[open] > summary { border-bottom: 1px solid var(--linie); }

/* Umschalter */
.segment { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 8px; }
.segment button {
  border: 1.5px solid transparent; border-radius: 12px; background: var(--feld); min-height: 50px; padding: 8px 6px;
  font-weight: 600; color: var(--text2); --farbe: var(--knopf);
}
.segment button.aktiv { background: var(--farbe); color: var(--auf-knopf); }
.segment button b { display: block; font-size: 21px; font-weight: 700; line-height: 1.15; color: var(--text); }
.segment button small { display: block; font-size: 13px; font-weight: 500; margin-top: 2px; }
.segment button.aktiv b { color: inherit; }
.p-sehr-hoch { --farbe: var(--rot) !important; }
.p-hoch { --farbe: var(--orange) !important; }
.p-mittel { --farbe: var(--gelb) !important; }
.p-niedrig { --farbe: var(--gruen) !important; }
.segment button[class*="p-"]::before {
  content: ""; display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--farbe); margin-right: 8px;
}
.segment button[class*="p-"].aktiv { color: var(--auf-farbe); }
.segment button[class*="p-"].aktiv::before { background: currentColor; }
@media (max-width: 520px) { .segment.vier { grid-auto-flow: row; grid-template-columns: 1fr 1fr; } }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: -6px; }
.chips button {
  border: 0; border-radius: 999px; background: var(--akzent-zart); color: var(--akzent);
  padding: 8px 14px; min-height: 38px; font-size: 15px; font-weight: 500;
}

/* --- Listen --- */
.reihe { display: flex; align-items: center; gap: 14px; padding: 14px 18px; min-height: 76px; color: inherit; }
.reihe .mitte, summary .mitte { flex: 1; min-width: 0; }
.titel { font-weight: 600; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow-wrap: anywhere; }
.unter { font-size: 15px; color: var(--text2); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.reihe .symbol.pfeil { color: var(--text3); }
.punkt { width: 9px; height: 9px; border-radius: 50%; background: var(--orange); flex: none; }
.nummer { width: 22px; text-align: center; color: var(--text3); font-weight: 600; font-variant-numeric: tabular-nums; flex: none; }
.daumen { width: 64px; height: 64px; border-radius: 12px; object-fit: cover; background: var(--feld); flex: none; display: grid; place-items: center; color: var(--text3); }
.marken { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.marke {
  display: inline-flex; align-items: center; font-size: 13px; font-weight: 650; line-height: 1; padding: 5px 9px; border-radius: 999px;
  background: var(--feld); color: var(--text2); --farbe: var(--text2);
}
.marke[class*="p-"] { background: color-mix(in srgb, var(--farbe) 15%, transparent); color: var(--farbe); }
.marke.fehlt { background: none; padding-left: 0; color: var(--text3); font-weight: 500; }
.anzahl { min-width: 30px; text-align: center; padding: 4px 10px; border-radius: 999px; background: var(--feld); color: var(--text2); font-size: 15px; font-weight: 600; }
.kachel {
  width: 48px; height: 48px; border-radius: 12px; flex: none; display: grid; place-items: center;
  background: var(--akzent-zart); color: var(--akzent);
}
.tagblatt { width: 52px; height: 56px; border-radius: 12px; flex: none; background: var(--feld); text-align: center; overflow: hidden; }
.tagblatt small { display: block; font-size: 11px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--rot); padding-top: 7px; line-height: 1; }
.tagblatt b { display: block; font-size: 24px; line-height: 1.25; font-weight: 650; font-variant-numeric: tabular-nums; }
.knoepfchen { display: flex; gap: 8px; flex: none; }
.kennwortanzeige {
  padding: 22px 18px 6px; font: 600 26px/1.3 ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  letter-spacing: 0.04em; text-align: center; user-select: all; -webkit-user-select: all;
}
.fuss.innen { margin: 0; padding: 8px 18px 18px; text-align: center; }
.schieben { display: flex; gap: 8px; }
.schieben button { border: 0; background: var(--feld); border-radius: 12px; width: 48px; height: 48px; display: grid; place-items: center; color: var(--akzent); }
.schieben button:disabled { opacity: 0.3; }

/* --- Knöpfe --- */
.knopf {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 50px; padding: 12px 20px; border: 0; border-radius: 14px;
  background: var(--akzent-zart); color: var(--akzent); font-weight: 600; text-align: center;
}
.knopf.haupt { background: var(--knopf); color: var(--auf-knopf); }
.knopf.still { background: none; }
.knopf.gefahr { background: none; color: var(--rot); font-weight: 500; }
.knopf:disabled { opacity: 0.5; }
.knopf.klein { min-height: 36px; padding: 6px 14px; border-radius: 999px; font-size: 15px; }
.knopf.rund { border-radius: 999px; padding: 12px 22px; white-space: nowrap; }
.knoepfe { display: grid; gap: 10px; }
.knoepfe.zwei { grid-template-columns: 1fr 1fr; }
.knoepfe.innen { padding: 0 18px 18px; }
@media (max-width: 480px) { .knoepfe.zwei { grid-template-columns: 1fr; } }
.ende { display: flex; justify-content: center; margin-top: 28px; }
.ende.innen { margin: 0; padding: 0 18px 8px; border-top: 1px solid var(--linie); }
.fuss.mittig { text-align: center; margin-top: 0; }
.fuss.unten { align-self: end; margin: 0 0 12px; }
label.knopf, label.fotokachel { cursor: pointer; position: relative; }
label input[type="file"] { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }

/* Aktionsleiste unten: immer in Daumennähe */
.aktionen {
  position: sticky; bottom: 0; z-index: 5; display: flex; gap: 10px;
  margin-top: 12px; padding: 28px 0 calc(14px + env(safe-area-inset-bottom));
  /* Läuft nach oben weich in den Seitengrund aus, statt als Balken zu stehen. */
  background: linear-gradient(to bottom, transparent, var(--grund) 26px);
  pointer-events: none;
}
.aktionen > * { pointer-events: auto; }
.aktionen .knopf { flex: 1; min-height: 54px; }
.aktionen .knopf:not(.haupt) { background: var(--karte); box-shadow: var(--schatten); }
.aktionen .knopf.haupt { flex: 2; }
main:has(.aktionen) { padding-bottom: 0; }

/* --- Fotos --- */
.fotos { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; padding: 18px; }
.fotos figure { margin: 0; position: relative; }
.fotos img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 14px; background: var(--feld); }
.fotos figure button {
  position: absolute; top: 8px; right: 8px; width: 36px; height: 36px; border: 0; border-radius: 50%;
  display: grid; place-items: center; background: rgba(0, 0, 0, 0.6); color: #fff;
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.fotos figure button.vor { right: auto; left: 8px; }
.suche {
  display: flex; align-items: center; gap: 10px; margin: 0 0 12px; padding: 0 14px;
  background: var(--karte); border-radius: var(--radius); box-shadow: var(--schatten); color: var(--text3);
}
.suche input { flex: 1; min-width: 0; border: 0; background: none; padding: 13px 0; outline: none; color: var(--text); }
.suche input::placeholder { color: var(--text3); opacity: 1; }
.fotokachel {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  aspect-ratio: 4 / 3; border-radius: 14px; border: 1.5px dashed color-mix(in srgb, var(--akzent) 45%, transparent);
  background: var(--akzent-zart); color: var(--akzent); font-weight: 600; font-size: 15px; text-align: center; padding: 8px;
}
.fotos.keine { grid-template-columns: 2fr 1fr; }
.fotos.keine .fotokachel { aspect-ratio: auto; min-height: 150px; }
.fotos.keine .fotokachel:first-of-type { font-size: 17px; }
.logo { max-height: 56px; max-width: 220px; display: block; background: #fff; border-radius: 8px; padding: 6px; margin-bottom: 10px; }

/* --- Anmeldung --- */
.anmeldung { max-width: 400px; margin: 9vh auto 0; text-align: center; }
.anmeldung > img { width: 84px; height: 84px; border-radius: 20px; box-shadow: 0 8px 24px var(--marke-schatten); margin-bottom: 20px; }
.anmeldung p { color: var(--text2); margin: 8px 0 28px; }
.anmeldung .karte { text-align: left; }
.anmeldung .knopf { width: 100%; margin-top: 16px; }
.meldung { color: var(--rot); margin-top: 14px; min-height: 1.4em; font-size: 15px; }

#hinweis {
  position: fixed; left: 50%; bottom: calc(96px + env(safe-area-inset-bottom)); transform: translateX(-50%);
  max-width: min(560px, calc(100vw - 32px)); padding: 13px 20px; border-radius: 16px; z-index: 20;
  background: var(--text); color: var(--grund); font-size: 15px; font-weight: 500; box-shadow: 0 8px 28px rgba(0, 0, 0, 0.28);
}
@media (prefers-reduced-motion: no-preference) {
  .knopf, .segment button, .chips button, .fotokachel { transition: transform 0.12s, opacity 0.15s, background-color 0.15s; }
  .knopf:active, .chips button:active, .segment button:active, .fotokachel:active { transform: scale(0.97); }
  a.reihe:active { background: var(--feld); }
  main > * { animation: herein 0.22s ease-out; }
  @keyframes herein { from { opacity: 0; transform: translateY(6px); } }
}
.formular > .meldung { margin: 0; min-height: 0; }
.formular > .meldung:empty { display: none; }

/* --- Checkliste und Bewertung --- */
.feldhinweis { display: block; margin: 6px 2px 0; font-size: 14px; color: var(--text3); }
.zeile > span.feldkopf { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.diktat {
  border: 0; background: none; padding: 0; min-height: 28px; font-size: 14px; font-weight: 500; color: var(--akzent);
  display: inline-flex; align-items: center; gap: 6px;
}
.diktat.an { color: var(--rot); }
.diktat.an::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; animation: puls 1s infinite; }
@keyframes puls { 50% { opacity: 0.25; } }
.marken .ort { font-size: 13px; font-weight: 500; color: var(--text2); align-self: center; margin-right: 2px; }
.zur-frage { margin: -12px 4px 18px; color: var(--text2); font-size: 15px; }

/* Farbstufen: die Zahl bleibt ruhig, nur Punkt und Balken tragen Farbe. */
.s-gruen { --stufe: var(--gruen); }
.s-gelb { --stufe: var(--gelb); }
.s-orange { --stufe: var(--orange); }
.s-rot { --stufe: var(--rot); }
.kleinwert { display: inline-flex; align-items: baseline; gap: 6px; font-size: 14px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.kleinwert::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--stufe); align-self: center; }
.kleinwert small { font-size: inherit; color: var(--text2); }
.kleinwert b { font-weight: 650; }
.stufenname { display: inline-flex; align-items: center; gap: 7px; font-weight: 600; font-size: 15px; }
.stufenname::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--stufe); flex: none; }
.balken { height: 6px; border-radius: 3px; background: var(--feld); overflow: hidden; }
.balken div { height: 100%; border-radius: 3px; background: var(--stufe); }
.delta { font-size: 13px; font-weight: 650; color: var(--text3); font-variant-numeric: tabular-nums; white-space: nowrap; }
.delta.auf { color: var(--gruen); }
.delta.ab { color: var(--rot); }

.legende { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: -4px 4px 12px; font-size: 14px; color: var(--text2); }
.legende span { display: inline-flex; align-items: center; gap: 6px; }
.legende b {
  min-width: 24px; padding: 2px 6px; border-radius: 6px; text-align: center; font-size: 13px; font-weight: 700;
  background: color-mix(in srgb, var(--farbe, var(--text3)) 16%, transparent); color: var(--farbe, var(--text2));
}
.a-A { --farbe: var(--gruen); }
.a-B { --farbe: var(--gelb); }
.a-C { --farbe: var(--orange); }
.a-D { --farbe: var(--rot); }
.bereich .werte { display: flex; gap: 14px; flex: none; }
@media (max-width: 560px) {
  .bereich .werte { flex-direction: column; gap: 2px; align-items: flex-end; }
  .bereich .werte small { font-size: 0; }
  .bereich .werte small::before { content: attr(data-kurz); font-size: 14px; }
}
.frage { padding: 16px 18px; }
.frage + .frage { border-top: 1px solid var(--linie); }
.frage-kopf { display: flex; gap: 10px; align-items: flex-start; }
.frage-kopf .mitte { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.frage-kopf .nummer { padding-top: 1px; }
.frage-fuss { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin: 12px 0 0 32px; }
.wahl { display: inline-flex; padding: 3px; border-radius: 11px; background: var(--feld); }
.wahl button {
  border: 0; background: none; min-width: 46px; min-height: 40px; padding: 0 10px; border-radius: 8px;
  font-weight: 650; color: var(--text2);
}
.wahl button.aktiv { background: var(--farbe, var(--text3)); color: var(--auf-farbe); }
.wahl .a-nz { font-weight: 500; font-size: 15px; }
.neu, .entfernen { border: 0; background: none; font-size: 15px; display: inline-flex; align-items: center; gap: 4px; }
.neu { color: var(--akzent); font-weight: 500; padding: 8px 0; margin-left: auto; }
.neu.betont { background: var(--knopf); color: var(--auf-knopf); padding: 8px 14px; border-radius: 999px; font-weight: 600; }
.entfernen { color: var(--text3); padding: 6px; min-width: 36px; min-height: 36px; justify-content: center; }
.frage-abweichungen { display: grid; gap: 6px; margin: 12px 0 0 32px; }
.frage-abweichungen a {
  display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 12px;
  background: var(--feld); color: inherit; font-size: 15px;
}
.frage-abweichungen .mitte { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 560px) { .frage-fuss, .frage-abweichungen { margin-left: 0; } }

.bewertung .bew-reihe { display: grid; grid-template-columns: minmax(0, 1.1fr) 1fr 1fr; gap: 10px 22px; align-items: end; padding: 14px 18px; }
.bewertung .bew-reihe + .bew-reihe { border-top: 1px solid var(--linie); }
.bewertung .bew-kopf { padding-bottom: 0; font-size: 13px; font-weight: 600; color: var(--text3); text-transform: uppercase; letter-spacing: 0.04em; }
.bewertung .bew-kopf + .bew-reihe { border-top: 0; }
.bew-reihe .name { font-weight: 600; align-self: center; overflow-wrap: anywhere; }
.bew-reihe .name small { display: block; font-size: 13px; font-weight: 500; color: var(--orange); margin-top: 2px; }
.teil-oben { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-bottom: 7px; }
.teil-oben .stufenname { font-size: 14px; font-weight: 500; color: var(--text2); min-width: 0; }
.teil-oben .wert { display: inline-flex; align-items: baseline; gap: 6px; }
.teil-oben b { font-size: 17px; font-weight: 700; font-variant-numeric: tabular-nums; }
@media (max-width: 560px) {
  .bewertung .bew-reihe { grid-template-columns: 1fr 1fr; }
  .bewertung .bew-reihe .name { grid-column: 1 / -1; }
  .bewertung .bew-kopf > span:first-child { display: none; }
  .teil-oben .stufenname { font-size: 0; gap: 0; }
}
.bewertung > .fuss.innen { text-align: left; padding-top: 12px; border-top: 1px solid var(--linie); }
.bewertung > .fuss.innen:first-child { border-top: 0; text-align: center; padding-top: 18px; }
details.skala { border-top: 1px solid var(--linie); }
details.skala > summary { min-height: 52px; font-weight: 600; }
.skala-liste { display: grid; gap: 14px; padding: 16px 18px 18px; }
.skala-liste > div > div { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.skala-liste small { color: var(--text3); font-size: 14px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.skala-liste p { margin: 4px 0 0 16px; color: var(--text2); font-size: 15px; }

/* Checkliste bearbeiten */
.bereich-edit { padding: 6px 18px 8px; }
.bereich-edit-kopf { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--linie); }
.bereichsname { flex: 1; min-width: 0; border: 0; background: none; font-size: 19px; font-weight: 700; padding: 6px 0; outline: none; }
.bereichsname::placeholder { color: var(--text3); font-weight: 600; }
.frage-edit { display: flex; align-items: flex-start; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--linie); }
.frage-edit .nummer { padding-top: 9px; }
.frage-edit textarea {
  flex: 1; min-width: 0; min-height: 40px; border: 1.5px solid transparent; border-radius: 10px; background: var(--feld);
  padding: 8px 12px; resize: none; overflow: hidden; outline: none; line-height: 1.4;
}
.frage-edit textarea:focus { border-color: var(--akzent); background: var(--karte); }
.frage-edit textarea::placeholder { color: var(--text3); opacity: 1; }
.wahl.schlicht button { min-width: 36px; min-height: 36px; padding: 0 8px; font-size: 14px; font-weight: 500; }
.wahl.schlicht button.aktiv { background: var(--karte); color: var(--text); font-weight: 650; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15); }
.neu.unten { margin-left: 0; padding: 12px 0 8px 32px; }
@media (max-width: 620px) {
  .frage-edit { flex-wrap: wrap; }
  .frage-edit textarea { flex-basis: calc(100% - 80px); }
  .frage-edit .wahl { margin-left: 32px; }
}
