/* Mietmango – Aussehen der Anwendung.
   Neu geschrieben. Schrift, Abstände und Aufbau folgen dem abgenommenen Mockup;
   seit der Marke Mietmango (Nr. 9 k) sind die Akzentfarben Blau aus dem Logo,
   Orange nur als Schmuck (Stempel, Linie unter dem Kopf), nie als Schriftfarbe.
   Nichts, was nur zum Mockup gehört.
   Handy-tauglich ab 320px Breite, ohne waagerechtes Scrollen. */

/* ---------- Gestaltungswerte ---------- */
:root {
  --hintergrund: #f4f2ee;
  --karte: #ffffff;
  --text: #1f2328;
  --text-leise: #5b6168;
  --linie: #d6d2cb;
  --akzent: #1f5fa8;
  --akzent-dunkel: #174a85;
  --akzent-hell: #e6eef8;
  --akzent-linie: #b9cfe9;
  --marke-orange: #f39200;
  --fehler: #b42318;
  --fehler-hell: #fdeeec;
  --fehler-linie: #f0b4ad;
  --warnung: #fdf0e4;
  --warnung-linie: #f2c9a1;
  --warnung-text: #7a3c06;
  --bedingung: #f1eee8;
  --entwurf: #fff5d9;
  --entwurf-linie: #ecd28a;
  --entwurf-text: #664b00;
  --radius: 12px;
  --schrift: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* ---------- Grundlagen ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--hintergrund);
  color: var(--text);
  font: 17px/1.5 var(--schrift);
  overflow-wrap: break-word;
}

h1 {
  font-size: 26px;
  line-height: 1.25;
  margin: 0 0 12px;
}

h2 {
  font-size: 19px;
  margin: 24px 0 10px;
}

h3 {
  font-size: 16px;
  margin: 0 0 8px;
}

p {
  margin: 0 0 14px;
}

ul {
  margin: 0 0 14px;
  padding-left: 22px;
}

a {
  color: var(--akzent);
}

img {
  max-width: 100%;
  height: auto;
}

[hidden] {
  display: none !important;
}

.leise {
  color: var(--text-leise);
  font-size: 15px;
}

/* ---------- Seitenaufbau ---------- */
.app {
  padding: 24px 16px 64px;
}

.seite-schmal {
  max-width: 560px;
  margin: 0 auto;
}

.seite-breit {
  max-width: 900px;
  margin: 0 auto;
}

.karte {
  background: var(--karte);
  border: 1px solid var(--linie);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 16px;
}

.karte > :last-child {
  margin-bottom: 0;
}

/* ---------- Knöpfe ---------- */
.knopf {
  display: block;
  width: 100%;
  margin-top: 12px;
  padding: 14px 18px;
  min-height: 54px;
  border: 1px solid var(--akzent);
  border-radius: 10px;
  background: var(--akzent);
  color: #fff;
  font: inherit;
  font-size: 18px;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}

.knopf:hover {
  background: var(--akzent-dunkel);
}

.knopf:focus-visible {
  outline: 2px solid var(--akzent);
  outline-offset: 2px;
}

.knopf:disabled {
  opacity: 0.45;
  cursor: default;
}

.knopf-sekundaer {
  background: #fff;
  color: var(--akzent);
}

.knopf-sekundaer:hover {
  background: var(--akzent-hell);
}

.knopf-gefahr {
  background: #fff;
  color: var(--fehler);
  border-color: var(--fehler);
}

.knopf-gefahr:hover {
  background: var(--fehler-hell);
}

.knopf-klein {
  display: inline-block;
  width: auto;
  margin: 0;
  padding: 9px 14px;
  min-height: 42px;
  font-size: 15px;
}

.knopf-reihe {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.knopf-reihe .knopf {
  flex: 1 1 160px;
  margin-top: 0;
}

/* ---------- Hinweis-Kästen ---------- */
/* Grün: in der Schriftgröße des Fließtexts (E71). */
.hinweis {
  margin: 14px 0;
  padding: 12px 14px;
  border: 1px solid var(--akzent-linie);
  border-radius: 10px;
  background: var(--akzent-hell);
  font-size: inherit;
}

.hinweis-warnung {
  margin: 14px 0;
  padding: 12px 14px;
  border: 1px solid var(--warnung-linie);
  border-radius: 10px;
  background: var(--warnung);
  color: var(--warnung-text);
  font-size: 15px;
}

.hinweis-fehler {
  margin: 14px 0;
  padding: 12px 14px;
  border: 1px solid var(--fehler-linie);
  border-radius: 10px;
  background: var(--fehler-hell);
  color: var(--fehler);
  font-size: 15px;
}

.hinweis > :last-child,
.hinweis-warnung > :last-child,
.hinweis-fehler > :last-child {
  margin-bottom: 0;
}

/* ---------- Formulare ---------- */
.feld {
  margin-bottom: 16px;
}

.feld > label,
.feld > .feld-titel {
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
}

.feld-hinweis {
  margin: 6px 0 0;
  color: var(--text-leise);
  font-size: 14px;
}

.feld-fehler {
  margin: 6px 0 0;
  color: var(--fehler);
  font-size: 14px;
  font-weight: 600;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="date"],
input[type="time"],
input[type="tel"],
textarea,
select {
  width: 100%;
  min-height: 50px;
  padding: 12px 14px;
  border: 1px solid var(--linie);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  font: inherit;
  font-size: 17px;
}

input:focus,
textarea:focus,
select:focus {
  outline: 2px solid var(--akzent);
  outline-offset: 1px;
  border-color: var(--akzent);
}

.feld-ungueltig input,
.feld-ungueltig textarea,
.feld-ungueltig select {
  border-color: var(--fehler);
}

textarea {
  min-height: 150px;
  resize: vertical;
}

/* ---------- Vermieter: Kopf und Navigation ---------- */
.vermieter-kopf {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 3px solid var(--marke-orange);
}

.marke {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 20px;
  color: var(--text);
  text-decoration: none;
}

/* Logo von Mietmango, unverändert wie geliefert (E93, E94). */
.marke-logo {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  flex: none;
}

.vermieter-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  align-items: center;
}

.vermieter-nav a {
  padding: 8px 12px;
  border-radius: 8px;
  text-decoration: none;
  color: var(--akzent);
  font-weight: 600;
}

.vermieter-nav a.aktiv {
  background: var(--akzent-hell);
}

.vermieter-nav button {
  font: inherit;
  font-weight: 600;
  color: var(--text-leise);
  background: none;
  border: 0;
  padding: 8px 12px;
  cursor: pointer;
}

.vermieter-nav a:focus-visible,
.vermieter-nav button:focus-visible,
.marke:focus-visible {
  outline: 2px solid var(--akzent);
  outline-offset: 2px;
  border-radius: 8px;
}

/* Kleines Schild hinter einem Wort („Beta“, „Text folgt“). */
.schild {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--entwurf);
  color: var(--entwurf-text);
  border: 1px solid var(--entwurf-linie);
  vertical-align: middle;
  white-space: nowrap;
}

/* Einmalige Rückmeldung oben auf der Seite. */
.meldung {
  background: var(--akzent-hell);
  border: 1px solid var(--akzent-linie);
  border-radius: 10px;
  padding: 12px 14px;
  margin: 0 auto 16px;
  font-weight: 600;
}

/* Überschrift einer Karte ohne Abstand nach oben. */
.karte > h2:first-child {
  margin-top: 0;
}

.mitte {
  text-align: center;
  margin: 16px 0 0;
}

.mitte.eng {
  margin-top: 8px;
}

.mitte.ohne-abstand {
  margin: 0;
}

/* ---------- Stempel „100 % kostenfrei und werbefrei“ (B1, B2) ---------- */
.stempel {
  display: inline-block;
  margin: 0 0 16px;
  padding: 8px 12px 9px;
  text-align: center;
  color: var(--akzent);
  background: #fff;
  border: 3px double var(--marke-orange);
  border-radius: 10px;
  transform: rotate(-3deg);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 11px;
  line-height: 1.3;
}

.stempel b {
  display: block;
  font-size: 23px;
  letter-spacing: 0;
  line-height: 1.1;
}

.stempel span {
  display: block;
}

/* ---------- Schritte auf der Startseite (B1) ---------- */
.schritte {
  list-style: none;
  padding: 0;
  margin: 20px 0 0;
  display: grid;
  gap: 10px;
}

.schritte li {
  background: var(--bedingung);
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 15px;
}

.schritte b {
  display: block;
  color: var(--akzent);
}

/* ---------- Zeile mit Häkchen ---------- */
.haken {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 12px 14px;
  border: 1px solid var(--linie);
  border-radius: 10px;
  margin-bottom: 10px;
  cursor: pointer;
  background: #fff;
}

.haken input {
  width: 22px;
  height: 22px;
  margin: 2px 0 0;
  flex: none;
  accent-color: var(--akzent);
}

.haken:has(input:checked) {
  border-color: var(--akzent);
  background: var(--akzent-hell);
}

.haken:has(input:focus-visible) {
  outline: 2px solid var(--akzent);
  outline-offset: 1px;
}

.haken-hinweis {
  display: block;
}

/* ---------- Anzeige eines Codes (Notfall-Code) ---------- */
.code-anzeige {
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: 21px;
  letter-spacing: 0.05em;
  background: var(--bedingung);
  border: 1px dashed var(--text-leise);
  border-radius: 10px;
  padding: 16px 10px;
  text-align: center;
  word-break: break-all;
  margin: 12px 0;
}

/* ---------- Kästen ---------- */
/* Kleiner grauer Info-Kasten. */
.kasten {
  background: var(--bedingung);
  border-radius: 10px;
  padding: 12px 14px;
  margin: 14px 0;
}

.kasten > :last-child {
  margin-bottom: 0;
}

.klein-text {
  font-size: 14px;
  color: var(--text-leise);
}

.klein-text p {
  margin-bottom: 8px;
}

/* Nachfrage vor etwas, das sich nicht rückgängig machen lässt. */
.bestaetigen-kasten {
  border: 2px solid var(--fehler);
  border-radius: 12px;
  padding: 16px;
  margin-top: 16px;
  background: var(--fehler-hell);
}

.bestaetigen-kasten > :last-child {
  margin-bottom: 0;
}

/* Knopf, der wie ein Link aussieht. */
.link-knopf {
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  color: var(--akzent);
  background: none;
  border: 0;
  padding: 4px 0;
  cursor: pointer;
  text-decoration: underline;
}

.link-knopf:focus-visible {
  outline: 2px solid var(--akzent);
  outline-offset: 2px;
}

/* Hinweis, solange gerechnet oder gewartet wird („wird vorbereitet“). */
.warte-hinweis {
  margin: 12px 0 0;
  color: var(--text-leise);
  font-size: 15px;
}

/* Platz für das Turnstile-Kästchen; nie breiter als die Karte. */
.turnstile-platz {
  max-width: 100%;
  overflow: hidden;
  margin: 12px 0 0;
}

.turnstile-platz:empty {
  margin: 0;
}

/* Text nur für Vorleseprogramme. */
.nur-vorleser {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- Schmale Bildschirme ---------- */
@media (max-width: 360px) {
  .app {
    padding: 16px 12px 48px;
  }

  .karte {
    padding: 16px;
  }

  h1 {
    font-size: 24px;
  }

  .code-anzeige {
    font-size: 18px;
  }
}

/* =====================================================================
   Seit Paket 3: Wohnungen, Fragen-Baukasten, Termine (B4, B5, B6, B8).
   Werte nach Mockup/stil.css, neu geschrieben.
   ===================================================================== */

/* Formular ohne eigenen Rahmen; „disabled“ sperrt alle Felder darin. */
.formular-gruppe {
  border: 0;
  margin: 0;
  padding: 0;
  min-width: 0;
}

/* Kleines Schild hinter einer Überschrift („freiwillig“, „vorbei“). */
.tag {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--entwurf);
  color: var(--entwurf-text);
  border: 1px solid var(--entwurf-linie);
  vertical-align: middle;
  white-space: nowrap;
}

/* ---------- Spalten, die auf dem Handy umbrechen ---------- */
.zwei-spalten {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 14px;
}

.drei-spalten {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 0 14px;
}

@media (max-width: 760px) {
  .drei-spalten {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .zwei-spalten {
    grid-template-columns: 1fr;
  }
}

/* ---------- Betrag mit Einheit, Summe ---------- */
.eingabe-mit-einheit {
  position: relative;
}

.eingabe-mit-einheit input {
  padding-right: 44px;
}

.eingabe-mit-einheit .einheit {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-leise);
  pointer-events: none;
}

.summe-zeile {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  background: var(--akzent-hell);
  border: 1px solid var(--akzent-linie);
  border-radius: 10px;
  padding: 12px 14px;
}

.summe-zeile span {
  font-weight: 600;
}

.summe-zeile b {
  font-size: 22px;
  color: var(--akzent-dunkel);
}

/* ---------- Kontakt: Feld und Häkchen in einer Zeile ---------- */
.kontakt-zeile {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: end;
  margin-bottom: 16px;
}

.kontakt-zeile .feld {
  margin-bottom: 0;
}

.kontakt-zeile .haken {
  margin-bottom: 0;
  min-height: 50px;
  align-items: center;
  padding: 10px 14px;
}

.kontakt-zeile .haken input {
  margin: 0;
}

.anschrift-hinweis {
  margin-top: -10px;
}

@media (max-width: 560px) {
  .kontakt-zeile {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .anschrift-hinweis {
    margin-top: -6px;
  }
}

/* ---------- Wartungshinweis des Betreibers (Paket 8, D6) ---------- */
.wartungshinweis {
  margin: 0;
  padding: 12px 16px;
  border-bottom: 2px solid var(--entwurf-linie);
  background: var(--entwurf);
  color: var(--entwurf-text);
  font-weight: 600;
  text-align: center;
  white-space: pre-line;
  overflow-wrap: anywhere;
}

/* ---------- Baukasten: Frage an und aus ---------- */
.baustein {
  border: 1px solid var(--linie);
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 12px;
  background: #fff;
}

.baustein-kopf {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  cursor: pointer;
}

.baustein-titel {
  display: block;
  font-weight: 700;
}

.baustein-text {
  display: block;
  font-size: 15px;
  color: var(--text-leise);
}

.baustein-innen {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed var(--linie);
}

.baustein-innen .feld:last-child,
.baustein-innen .haken:last-child {
  margin-bottom: 0;
}

.baustein.aus {
  background: var(--bedingung);
}

.baustein.aus .baustein-titel {
  color: var(--text-leise);
}

.baustein.aus .baustein-innen {
  display: none;
}

/* Vom Betreiber für alle abgeschaltete Frage (Paket 8, D7): nicht schaltbar. */
.baustein.abgeschaltet {
  background: var(--bedingung);
}

.baustein.abgeschaltet .baustein-kopf {
  cursor: default;
}

.baustein.abgeschaltet .schalter {
  opacity: 0.45;
}

.baustein.abgeschaltet .baustein-titel {
  color: var(--text-leise);
}

.baustein.abgeschaltet .baustein-innen {
  display: none;
}

.baustein-abgeschaltet {
  margin: 10px 0 0;
  font-size: 15px;
  color: var(--warnung-text);
}

/* Schalter (an/aus). */
.schalter {
  position: relative;
  flex: none;
  width: 50px;
  height: 30px;
  margin-top: 2px;
}

.schalter input {
  position: absolute;
  z-index: 1;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.schalter span {
  position: absolute;
  inset: 0;
  background: #cfcac2;
  border-radius: 999px;
  transition: background 0.2s;
}

.schalter span::before {
  content: "";
  position: absolute;
  left: 3px;
  top: 3px;
  width: 24px;
  height: 24px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.2s;
}

.schalter input:checked + span {
  background: var(--akzent);
}

.schalter input:checked + span::before {
  transform: translateX(20px);
}

.schalter input:focus-visible + span {
  outline: 2px solid var(--akzent);
  outline-offset: 2px;
}

.schalter input:disabled {
  cursor: default;
}

/* Auswahl (Radioknöpfe als Kästchen). */
.auswahl-reihe {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.auswahl-reihe label {
  flex: 1 1 140px;
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid var(--linie);
  border-radius: 8px;
  background: #fff;
  font-weight: 600;
  cursor: pointer;
}

.auswahl-reihe input {
  width: 20px;
  height: 20px;
  margin: 0;
  flex: none;
  accent-color: var(--akzent);
}

.auswahl-reihe label:has(input:checked) {
  border-color: var(--akzent);
  background: var(--akzent-hell);
}

.auswahl-reihe.gestapelt {
  flex-direction: column;
}

.auswahl-reihe.gestapelt label {
  flex: none;
}

/* Eigener Kasten für die vertraulichen Fragen. */
.karte-vertraulich {
  background: var(--akzent-hell);
  border: 2px solid var(--akzent);
}

.karte-vertraulich h2 {
  color: var(--akzent-dunkel);
}

.karte-vertraulich .leise {
  color: var(--text);
}

/* ---------- Verschlossene Karte „Eigene Fragen“ ---------- */
.karte-eigene {
  border: 2px dashed var(--warnung-linie);
}

.karte-eigene.zu {
  background: #faf8f4;
}

.schloss-knopf {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 88px;
  height: 88px;
  margin: 6px auto 4px;
  font-size: 42px;
  line-height: 1;
  border-radius: 50%;
  border: 2px solid var(--linie);
  background: #fff;
  cursor: pointer;
}

.schloss-knopf:hover {
  border-color: var(--warnung-text);
  background: var(--warnung);
}

.schloss-knopf:focus-visible {
  outline: 3px solid var(--akzent);
  outline-offset: 3px;
}

.karte-eigene .bestaetigen-kasten {
  border-color: #d9903d;
  background: var(--warnung);
}

.karte-eigene .bestaetigen-kasten .knopf-reihe .knopf {
  flex: 0 1 auto;
}

.eigene-frage {
  border: 1px solid var(--linie);
  border-radius: 10px;
  padding: 14px;
  margin-bottom: 12px;
  background: #fff;
}

.eigene-kopf {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.eigene-frage .zwei-spalten .feld {
  margin-bottom: 0;
}

.knopf.zeilen-knopf {
  font-size: 13px;
  min-height: 30px;
  padding: 4px 10px;
}

.eigene-sperren-zeile {
  margin: 14px 0 0;
}

@media (max-width: 560px) {
  .eigene-frage .zwei-spalten .feld:first-child {
    margin-bottom: 14px;
  }
}

/* ---------- Übersicht (B6) ---------- */
.weitere-wohnung {
  margin: 0 0 16px;
}

.wohnung-block + .wohnung-block {
  margin-top: 32px;
}

.uebersicht-kopf {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}

.uebersicht-kopf h2 {
  margin: 0;
}

.uebersicht-kopf .knopf-reihe {
  margin-top: 0;
}

.uebersicht-kopf .knopf-reihe .knopf {
  flex: 0 1 auto;
}

.zahlen {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.zahlen div {
  background: var(--bedingung);
  border-radius: 10px;
  padding: 12px 8px;
  text-align: center;
  font-size: 14px;
  color: var(--text-leise);
}

.zahlen b {
  display: block;
  font-size: 28px;
  line-height: 1.2;
  color: var(--text);
}

@media (max-width: 560px) {
  .zahlen {
    grid-template-columns: 1fr 1fr;
  }
}

.termin-stand {
  list-style: none;
  padding: 0;
  margin: 14px 0 0;
}

.termin-stand li {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 4px 12px;
  padding: 9px 0;
  border-bottom: 1px solid var(--linie);
}

.termin-stand li:last-child {
  border-bottom: 0;
}

.leer {
  margin: 14px 0 0;
  padding: 8px 0;
  color: var(--text-leise);
  font-style: italic;
}

.karte > .leer:first-child {
  margin-top: 0;
}

/* ---------- Termine (B8) ---------- */
.termin-zeile {
  display: grid;
  grid-template-columns: 1.3fr 1fr 0.8fr 132px;
  gap: 8px;
  align-items: end;
}

.termin-zeile label {
  display: block;
  margin-bottom: 4px;
  font-size: 13px;
  color: var(--text-leise);
}

.termin-zeile .knopf-klein {
  width: 100%;
  min-height: 50px;
}

@media (max-width: 560px) {
  .termin-zeile {
    grid-template-columns: 1fr 1fr;
  }
}

.termin-aendern {
  margin-top: 14px;
}

.termin-hinweis {
  margin: 8px 0 0;
}

/* ---------- Link (B5) ---------- */
.link-anzeige {
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: 15px;
  background: var(--bedingung);
  border: 1px solid var(--linie);
  border-radius: 10px;
  padding: 12px 14px;
  word-break: break-all;
  margin: 12px 0;
}

/* ---------- Wohnungs-Wähler ---------- */
.waehler {
  max-width: 420px;
}

/* Raster-Zellen dürfen schmaler werden als ihr Inhalt (Datum, Uhrzeit, lange
   Wörter) – sonst schiebt das Handy die Seite seitlich. */
.zwei-spalten > *,
.drei-spalten > *,
.kontakt-zeile > *,
.termin-zeile > *,
.uebersicht-kopf > * {
  min-width: 0;
}

/* =====================================================================
   Seit Paket 4: Fragebogen der Bewerber (A1–A7, /f/ und /t/).
   Wie das Mockup (Mieter-Ansicht PC und iPhone), neu geschrieben. Farben nur
   aus den Variablen oben. Grüne Kästen immer mit .hinweis (Fließtext-Größe, E71).
   ===================================================================== */

/* Am Rechner eine weiße Karte, höchstens 640 px breit, mittig; am Handy volle
   Breite mit 16 px Rand (Rand von .app). */
.seite-bewerber {
  max-width: 640px;
  margin: 0 auto;
  background: var(--karte);
  border: 1px solid var(--linie);
  border-radius: var(--radius);
  padding: 30px 32px 32px;
}

.seite-bewerber main > :last-child {
  margin-bottom: 0;
}

@media (max-width: 560px) {
  .seite-bewerber {
    padding: 22px 16px 26px;
  }
}

.kopf-klein {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-leise);
  margin-bottom: 10px;
}

.wohnung-karte {
  background: var(--bedingung);
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 18px;
}

.wohnung-titel {
  font-weight: 700;
}

.wohnung-zeile {
  color: var(--text-leise);
  font-size: 15px;
}

/* Große Antwort-Knöpfe (Tippfläche mindestens 48 px). */
.antwort-knopf {
  display: block;
  width: 100%;
  margin-top: 12px;
  padding: 18px;
  min-height: 64px;
  border: 2px solid var(--linie);
  border-radius: 12px;
  background: #fff;
  color: var(--text);
  font: inherit;
  font-size: 20px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}

.antwort-knopf:hover,
.antwort-knopf.gewaehlt {
  border-color: var(--akzent);
  background: var(--akzent-hell);
}

.antwort-knopf:focus-visible,
.termin-knopf:focus-visible,
.zaehler-knopf:focus-visible,
.zurueck-link:focus-visible {
  outline: 2px solid var(--akzent);
  outline-offset: 2px;
}

/* Fortschritt: Kopfzeile und Balken (<progress>, ohne Inline-Stil). */
.fortschritt-kopf {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  min-height: 30px;
  margin-bottom: 6px;
  color: var(--text-leise);
  font-size: 14px;
}

progress.fortschritt {
  display: block;
  width: 100%;
  height: 8px;
  margin: 0 0 22px;
  border: 0;
  border-radius: 999px;
  background: var(--linie);
  color: var(--akzent);
  overflow: hidden;
  -webkit-appearance: none;
  appearance: none;
}

progress.fortschritt::-webkit-progress-bar {
  background: var(--linie);
  border-radius: 999px;
}

progress.fortschritt::-webkit-progress-value {
  background: var(--akzent);
  border-radius: 999px;
}

progress.fortschritt::-moz-progress-bar {
  background: var(--akzent);
  border-radius: 999px;
}

.zurueck-link {
  padding: 4px 0;
  border: 0;
  background: none;
  color: var(--akzent);
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}

/* Zähler für Erwachsene und Kinder (A2). */
.zaehler {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  padding: 10px 12px;
  border: 1px solid var(--linie);
  border-radius: 12px;
}

.zaehler-name {
  font-weight: 600;
}

.zaehler-name .leise {
  display: block;
  font-weight: 400;
}

.zaehler-regler {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: none;
}

.zaehler-knopf {
  width: 48px;
  height: 48px;
  border: 2px solid var(--akzent);
  border-radius: 50%;
  background: #fff;
  color: var(--akzent);
  font-size: 26px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
}

.zaehler-knopf:disabled {
  opacity: 0.3;
  cursor: default;
}

.zaehler-wert {
  min-width: 32px;
  font-size: 24px;
  font-weight: 700;
  text-align: center;
}

/* Punkte zu Lage, Ausstattung und Mietvertrag (A2). */
.kriterien {
  list-style: none;
  margin: 0 0 12px;
  padding: 0;
}

.kriterien li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 9px 0;
  border-bottom: 1px solid var(--linie);
  font-size: 16px;
}

.kriterien li:last-child {
  border-bottom: 0;
}

.kriterien .zeichen {
  flex: none;
  width: 22px;
  color: var(--akzent);
  font-weight: 700;
}

.eigen-antwort {
  min-height: 90px;
}

/* Grauer Hinweis mit Schloss (vertrauliche Fragen) bzw. Stift (eigene Fragen). */
.hinweis-schloss {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 18px 0 0;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--bedingung);
  color: var(--text-leise);
  font-size: 14px;
}

/* Terminwahl (A5). */
.termin-knopf {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  width: 100%;
  margin-top: 10px;
  padding: 14px 16px;
  min-height: 64px;
  border: 2px solid var(--linie);
  border-radius: 12px;
  background: #fff;
  color: var(--text);
  font: inherit;
  font-size: 17px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}

.termin-knopf:hover:not(.voll) {
  border-color: var(--akzent);
  background: var(--akzent-hell);
}

.termin-knopf.gewaehlt {
  border-color: var(--akzent);
  background: var(--akzent-hell);
  box-shadow: inset 0 0 0 1px var(--akzent);
}

.termin-knopf.gewaehlt > span:first-child::before {
  content: "✓ ";
  color: var(--akzent);
}

.termin-knopf .uhr {
  display: block;
  color: var(--text-leise);
  font-size: 15px;
  font-weight: 400;
}

.termin-frei {
  color: var(--akzent);
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
}

.termin-knopf.voll {
  cursor: default;
  background: var(--bedingung);
  color: var(--text-leise);
}

.termin-knopf.voll .termin-frei {
  color: var(--text-leise);
}

.termin-rechts {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  margin-left: auto;
}

.warte-haken {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  min-height: 44px;
  border: 1px solid var(--linie);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}

.warte-haken input {
  flex: none;
  width: 20px;
  height: 20px;
  margin: 0;
  accent-color: var(--akzent);
}

.warte-haken:has(input:checked) {
  border-color: var(--akzent);
  background: var(--akzent-hell);
}

.termin-hinweis {
  margin-top: 16px;
}

/* Warte-Hinweis „Bitte schließen Sie die Seite nicht …“ mit Dreh-Zeichen. */
.hinweis-warten {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
  padding: 12px 14px;
  border: 1px solid var(--warnung-linie);
  border-radius: 10px;
  background: var(--warnung);
  color: var(--warnung-text);
  font-size: 15px;
}

.dreher {
  flex: none;
  width: 22px;
  height: 22px;
  border: 3px solid var(--warnung-linie);
  border-top-color: var(--warnung-text);
  border-radius: 50%;
  animation: drehen 0.9s linear infinite;
}

@keyframes drehen {
  to {
    transform: rotate(360deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .dreher {
    animation: none;
  }
}

/* Großes Zeichen über der Überschrift (A3, A4, A6, A7). */
.erfolg-zeichen {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  margin-bottom: 14px;
  border-radius: 50%;
  background: var(--akzent-hell);
  color: var(--akzent);
  font-size: 32px;
  font-weight: 700;
}

.erfolg-zeichen.neutral {
  background: var(--bedingung);
  color: var(--text-leise);
}

/* Grauer Kasten mit Zusammenfassung (A4, A6, A7). */
.box {
  margin: 14px 0;
  padding: 12px 14px;
  border-radius: 10px;
  background: var(--bedingung);
}

.box > :last-child {
  margin-bottom: 0;
}

.zusammenfassung {
  margin: 0;
}

.zusammenfassung dt {
  margin-top: 10px;
  color: var(--text-leise);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.zusammenfassung dt:first-child {
  margin-top: 0;
}

.zusammenfassung dd {
  margin: 0;
  font-weight: 600;
}

.nach-feldern {
  margin: -6px 0 14px;
}

/* Kontakt-Fußzeile auf B1 und im Vermieter-Bereich (Nr. 9 k, D11). */
.kontakt-fuss {
  max-width: 640px;
  margin: 12px auto 0;
  padding: 12px;
  color: var(--text-leise);
  font-size: 14px;
  text-align: center;
}

.kontakt-fuss a {
  color: var(--akzent);
}

/* Links zu Impressum und Datenschutz – immer sichtbar, auch ohne Kontakt-Zeile. */
.kontakt-fuss .kontakt-zeile:not([hidden]) {
  display: block;
  margin-bottom: 4px;
}

.erstellt-mit .rechts-links a {
  color: var(--text-leise);
}

.rechts-links a + a,
.erstellt-link + .rechts-links {
  margin-left: 16px;
}

/* Impressum und Datenschutzerklärung: Absätze mit Zeilenumbrüchen aus den Texten. */
.rechtstext p {
  white-space: pre-line;
}

.rechtstext h2 {
  font-size: 18px;
  margin: 22px 0 8px;
}

/* Fußzeile „Erstellt mit …“ (D20). */
.erstellt-mit {
  max-width: 640px;
  margin: 12px auto 0;
  padding: 12px;
  color: var(--text-leise);
  font-size: 13px;
  text-align: center;
}

.erstellt-mit a {
  color: var(--text-leise);
}

@media (max-width: 360px) {
  .seite-bewerber {
    padding: 18px 14px 22px;
  }

  .antwort-knopf {
    font-size: 18px;
  }
}

/* =====================================================================
   Seit Paket 5: Bewerberliste des Vermieters (B11). Wie das Mockup, neu
   geschrieben: eine Zeile je Bewerbung, am Handy jede Zeile als Kärtchen.
   ===================================================================== */

/* Die Liste darf breiter sein als der Rest der Seite, damit alles in eine
   Zeile passt. Kopf und Navigation bleiben, wo sie sind. */
.liste-weit {
  position: relative;
  left: 50%;
  transform: translateX(-50%);
  width: min(1280px, calc(100vw - 32px));
}

.listen-gruppe {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-leise);
  margin: 24px 0 8px 4px;
}

.liste-weit > .listen-gruppe:first-child {
  margin-top: 4px;
}

.karten-rechts {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 6px 16px;
}

.sortier-wahl {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--text-leise);
  white-space: nowrap;
}

.sortier-wahl select {
  width: auto;
  font-size: 14px;
  padding: 5px 10px;
  min-height: 34px;
}

.liste-rahmen {
  overflow-x: auto;
  margin-top: 10px;
}

table.tabelle {
  width: 100%;
  border-collapse: collapse;
}

.tabelle th,
.tabelle td {
  text-align: left;
  padding: 7px;
  border-bottom: 1px solid var(--linie);
  vertical-align: middle;
}

.tabelle th {
  font-size: 12px;
  color: var(--text-leise);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

table.tabelle.liste {
  font-size: 14px;
}

.tabelle.liste td {
  white-space: nowrap;
}

.tabelle.liste tbody tr:last-child td {
  border-bottom: 0;
}

.tabelle.liste td.notiz {
  width: 100%;
  min-width: 170px;
}

.tabelle.liste .zweite {
  display: block;
  font-size: 13px;
  color: var(--text-leise);
}

.tabelle.liste td.anruf,
.tabelle.liste th.anruf {
  text-align: center;
  padding-left: 0;
  padding-right: 0;
}

.tabelle.liste td.aktion,
.tabelle.liste th.aktion {
  text-align: right;
  padding-right: 0;
}

.zeilen-aktionen {
  display: inline-flex;
  gap: 6px;
}

.antworten-knopf {
  display: block;
  font-size: 13px;
  padding: 2px 0 0;
}

.schild-zeile {
  display: block;
  margin: 2px 0;
}

.tag-gruen {
  background: var(--akzent-hell);
  color: var(--akzent-dunkel);
  border-color: var(--akzent-linie);
}

.detail-zeile td {
  white-space: normal;
  background: var(--bedingung);
  border-radius: 0 0 8px 8px;
}

.weitere-antworten .zusammenfassung {
  margin: 0;
}

/* Wird das Fenster schmaler, dürfen Name und Kontakt umbrechen – Bewertung
   und Notiz bleiben immer sichtbar. */
@media (max-width: 1310px) {
  .tabelle.liste td.name {
    white-space: normal;
  }

  .tabelle.liste td.kontakt {
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .tabelle.liste td.notiz {
    min-width: 150px;
  }
}

/* Notiz: mehrzeilig, wächst mit dem Text (Höhe setzt das Programm, bis zehn
   Zeilen, danach rollt das Feld innen). */
.notiz-feld {
  display: block;
  width: 100%;
  font: inherit;
  font-size: 14px;
  line-height: 1.4;
  padding: 6px 10px;
  min-height: 34px;
  border: 1px solid var(--linie);
  border-radius: 8px;
  resize: none;
  overflow-y: hidden;
  white-space: pre-wrap;
}

/* Bewertung ++ + 0 − */
.urteil {
  display: inline-flex;
  gap: 4px;
}

.urteil-knopf {
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  min-width: 32px;
  min-height: 30px;
  padding: 0 7px;
  border-radius: 16px;
  border: 1px solid var(--linie);
  background: #fff;
  color: var(--text);
  cursor: pointer;
}

.urteil-knopf:hover {
  border-color: var(--text-leise);
}

.urteil-knopf:focus-visible,
.anruf-knopf:focus-visible {
  outline: 2px solid var(--akzent);
  outline-offset: 1px;
}

.urteil-knopf:disabled,
.anruf-knopf:disabled {
  cursor: default;
  opacity: 0.6;
}

.urteil-sehr_gut.aktiv {
  background: #1f7a3d;
  border-color: #1f7a3d;
  color: #fff;
}

.urteil-gut.aktiv {
  background: #5b9a3c;
  border-color: #5b9a3c;
  color: #fff;
}

.urteil-neutral.aktiv {
  background: #5b6168;
  border-color: #5b6168;
  color: #fff;
}

.urteil-negativ.aktiv {
  background: var(--fehler);
  border-color: var(--fehler);
  color: #fff;
}

/* Merk-Knopf „schon angerufen“: Telefonhörer, grau oder rot. */
.anruf-knopf {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: none;
  color: #b7b1a7;
  cursor: pointer;
  vertical-align: middle;
}

.anruf-knopf:hover:not(:disabled) {
  background: var(--bedingung);
  color: #9c968c;
}

.anruf-knopf.aktiv {
  color: #d0141f;
}

.anruf-knopf svg {
  display: block;
}

.personen .anruf-knopf {
  margin: -4px 4px -4px -6px;
}

/* Eingeladene in einer Terminkarte. */
.termin-teil {
  margin: 18px 0 6px;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-leise);
}

.personen {
  list-style: none;
  padding: 0;
  margin: 0;
}

.personen li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 12px;
  padding: 9px 0;
  border-bottom: 1px solid var(--linie);
}

.personen li:last-child {
  border-bottom: 0;
}

.personen-rechts {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

/* Bewerber hinzufügen. */
.dazu-knopf {
  margin-top: 14px;
}

.dazu-leer {
  margin: 12px 0 0;
}

.dazu-kasten select {
  max-width: 460px;
}

.termin-karte .knopf-reihe .knopf,
.liste-weit .bestaetigen-kasten .knopf-reihe .knopf {
  flex: 0 1 auto;
}

.auswahl-reihe label.wahl-mit-text {
  align-items: flex-start;
  font-weight: 400;
  padding: 12px 14px;
}

.wahl-mit-text input {
  margin-top: 2px;
}

.wahl-mit-text b {
  display: block;
}

.wahl-mit-text .leise {
  display: block;
  font-size: 14px;
  margin-top: 2px;
}

/* Am Handy: jede Zeile als Kärtchen, links die Spalte, rechts der Wert. */
@media (max-width: 700px) {
  .tabelle.liste thead {
    display: none;
  }

  .tabelle.liste tr {
    display: block;
    border: 1px solid var(--linie);
    border-radius: 10px;
    padding: 8px 12px;
    margin-bottom: 10px;
  }

  .tabelle.liste tr.detail-zeile {
    margin-top: -10px;
    border-top: 0;
    border-radius: 0 0 10px 10px;
  }

  .tabelle.liste td {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    border: 0;
    padding: 4px 0;
    text-align: right;
    white-space: normal;
  }

  .tabelle.liste td::before {
    content: attr(data-spalte);
    color: var(--text-leise);
    font-size: 13px;
    text-align: left;
    flex: none;
  }

  .tabelle.liste tr.detail-zeile td {
    display: block;
    text-align: left;
  }

  .tabelle.liste tr.detail-zeile td::before {
    content: none;
  }

  .tabelle.liste td.notiz {
    width: auto;
    min-width: 0;
  }

  .tabelle.liste .notiz-feld {
    width: 62%;
  }

  .tabelle.liste td.anruf,
  .tabelle.liste td.aktion {
    text-align: right;
  }
}

/* ---------- Paket 6: Stufe 2 nach der Besichtigung (A10, A11, A12) ---------- */
.knopf-zusage {
  border-color: #1f7a3d;
  background: #1f7a3d;
}

.knopf-zusage:hover {
  background: #17612f;
}

.knopf-absage {
  border-color: #b42318;
  background: #b42318;
}

.knopf-absage:hover {
  background: #91190f;
}

/* Nachfrage vor der Zusage: grün statt rot. */
.bestaetigen-kasten.zusage {
  border-color: #1f7a3d;
  background: #e9f5ec;
}

/* Hinweis direkt unter dem Titel eines Ja/Nein-Feldes. */
.feld-hinweis.vor-auswahl {
  margin: -2px 0 8px;
}

.amt-haken {
  margin-bottom: 18px;
}

/* Ein Kasten je Mieter; weitere Mieter leicht getönt (wie im Mockup). */
.mieter-block {
  margin: 0 0 16px;
  padding: 16px 14px;
  border: 1px solid var(--linie);
  border-radius: 12px;
  background: #fff;
  scroll-margin-top: 20px;
}

.mieter-block.mieter-2 {
  border-color: #c5d5e4;
  background: #eef4f9;
}

.mieter-block.mieter-3 {
  border-color: #c3dbcb;
  background: #eef6f0;
}

.mieter-block.mieter-4 {
  border-color: #d2cce6;
  background: #f3f1f9;
}

.mieter-block.mieter-5 {
  border-color: #e1d3bb;
  background: #f8f3ea;
}

.mieter-block .mieter-kopf {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.mieter-block .mieter-kopf h2 {
  margin: 0;
}

.mieter-block .mieter-kopf .knopf {
  width: auto;
  margin-top: 0;
}

.mieter-block h3 {
  margin: 22px 0 12px;
  padding-top: 16px;
  border-top: 1px solid var(--linie);
  font-size: 17px;
}

.buergen {
  margin: 0 0 4px;
  padding: 12px 14px;
  border-radius: 10px;
  background: var(--bedingung);
}

.buergen .feld:last-child {
  margin-bottom: 0;
}

.buergen-titel {
  margin: 0 0 10px;
  font-weight: 600;
}

/* Knopf „+ Mieter hinzufügen“: kräftiges Orange, damit ihn niemand übersieht. */
.mieter-dazu {
  display: block;
  width: 100%;
  margin: 0 0 8px;
  padding: 16px;
  border: 0;
  border-radius: 12px;
  background: #d4650b;
  box-shadow: 0 2px 6px rgba(212, 101, 11, 0.35);
  color: #fff;
  font: inherit;
  font-size: 17px;
  font-weight: 700;
  cursor: pointer;
}

.mieter-dazu:hover {
  background: #b9560a;
}

.mieter-dazu:focus-visible {
  outline: 3px solid #d4650b;
  outline-offset: 3px;
}

.mieter-voll {
  margin: 0 0 8px;
}

textarea.eigen-antwort {
  min-height: 96px;
}

/* Zusammenfassung: zweite und dritte Zeile unter einem Namen (A12, B10). */
.zusammenfassung .zusatz {
  display: block;
  font-weight: 400;
  font-size: 15px;
}

.zusammenfassung dt.frage-dt {
  text-transform: none;
  letter-spacing: 0;
  font-size: 14px;
}

/* ---------- Paket 6: Filter der Zusagen (B10, B11) ---------- */
.filter-karte {
  border-color: var(--akzent-linie);
  background: var(--akzent-hell);
}

.filter-titel {
  margin: 12px 0 8px;
  font-weight: 600;
}

.filter-zeile {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 26px;
  align-items: flex-end;
}

.filter-feld {
  width: 180px;
}

.filter-feld.schmal {
  width: 130px;
}

.filter-feld label {
  display: block;
  margin-bottom: 4px;
  font-size: 14px;
  font-weight: 600;
}

.filter-feld input {
  min-height: 42px;
  padding: 8px 12px;
  font-size: 15px;
}

.filter-feld .eingabe-mit-einheit input {
  padding-right: 38px;
}

.filter-schalter {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}

.filter-schalter .schalter {
  margin-top: 0;
}

.filter-karte .link-knopf {
  padding: 0;
}

/* ---------- Paket 6: Zusagen (B10) ---------- */
.zusage-karte .name-vorher {
  margin: 6px 0 0;
}

.zusage-spalten {
  margin-top: 14px;
}

.zusage-fuss {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 8px 16px;
  margin-top: 14px;
}

.zusage-fuss .knopf {
  width: auto;
  margin-top: 0;
}

.zusagen-hinweis {
  margin: 8px 0 0;
}

/* Seite /t/ ohne Termin: Frage vor dem Knopf zur Rückmeldung (D12). */
.nachher-frage {
  margin: 20px 0 0;
}

@media (max-width: 560px) {
  .filter-feld,
  .filter-feld.schmal {
    width: calc(50% - 13px);
  }

  .filter-schalter {
    width: 100%;
  }
}
