/* =====================================================================
   Detailvorlage «Immobilie» (Sjabloon 2/2: Kauf und Miete), WF2, 07.10.2026.
   Lädt NACH styles.css; alle Änderungen an den Detailseiten stehen hier (styles.css bleibt unverändert).
   Tokens und Site-Muster aus styles.css (Levins Paket); Klassen mit Präfix ang- wie in der Übersicht.
   Stufen: ≥ 1200 · 1024–1199 · 768–1023 · < 768 · < 520 (wie styles.css).
   ===================================================================== */

/* ---------- Lenis: die vier Regeln von lenis@1.1.19/dist/lenis.css wörtlich (191 Bytes, gemessen 07.10.2026) ----------
   Die Site selbst lädt lenis.css nicht (nur lenis.min.js und die Init). Eigene Ergänzung: scroll-behavior auto
   während Lenis glättet – styles.css setzt html { scroll-behavior: smooth }, das würde Lenis' Schritte nochmals glätten. */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth [data-lenis-prevent] { overscroll-behavior: contain; }
.lenis.lenis-stopped { overflow: clip; }
.lenis.lenis-smooth iframe { pointer-events: none; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }   /* Ergänzung, nicht aus lenis.css */

/* Fokus und Sprungziele nie unter dem festen Kopf der Site */
html { scroll-padding-top: calc(var(--kopf-hoehe) + var(--abstand-4)); }

/* Dunkelblauer Fokusrahmen auf hellen Flächen (README Entscheid 17) – auch ausserhalb von .ang-detail */
.ang-galerie :focus-visible, .ang-weitere :focus-visible, .ang-fuss-zeile :focus-visible, .ang-aktionsleiste :focus-visible {
  outline: 2px solid var(--farbe-primaer);
  outline-offset: 2px;
}

/* ---------- D1 Objektkopf: blaues Band (Standard) ---------- */
.ang-objektkopf { position: relative; }
.ang-objektkopf__raster { grid-template-columns: minmax(0, 1fr) auto; gap: var(--abstand-5) var(--abstand-7); }
.ang-objektkopf h1 { max-width: 22em; margin-bottom: var(--abstand-2); }
.ang-objektkopf__adresse { margin: 0; }
.ang-objektkopf__kern { margin: var(--abstand-2) 0 0; font-size: var(--groesse-klein); line-height: var(--zeile-klein); color: rgba(255, 255, 255, .9); }
.ang-objektkopf__aktion { display: grid; justify-items: end; gap: var(--abstand-4); }
.ang-objektkopf__preis { text-align: right; }
.ang-objektkopf__betrag { font-size: 32px; line-height: 40px; }
.knopf--hell { background: var(--farbe-weiss); border-color: var(--farbe-weiss); color: var(--farbe-primaer); font-weight: 700; }
.knopf--hell:hover { background: var(--farbe-hellblau); border-color: var(--farbe-hellblau); color: var(--farbe-primaer-dunkel); }

/* Variante ?kopf=foto (Owner-Entscheid): Titelbild als Hero wie /projekte/, Text unten auf dunklem Verlauf.
   Klassen der Site-Hero (.ang-hero, .ang-hero__foto, img.parallax). Drei Ebenen: oben ein eigener dunkler Verlauf
   für die weisse Navigation (auch auf hellem Foto ≥ 4,5 : 1, Review MINOR-7), die Abdunkelung der Site, unten ein
   dunkelblauer Verlauf NUR in der Textzone (das Foto bleibt in der Mitte hell). Gemessen: O-foto (weisses Foto). */
.ang-objektkopf--foto.ang-hero {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: clamp(520px, 86svh, 820px);
  padding: var(--hero-oben) 0 var(--abstand-7);
}
.ang-objektkopf--foto .ang-hero__foto::after {
  background:
    linear-gradient(rgba(0, 0, 0, .6) 0%, rgba(0, 0, 0, 0) 30%),
    linear-gradient(rgba(0, 0, 0, .32) -5.72%, rgba(0, 0, 0, 0) 35.15%, rgba(0, 0, 0, .32) 85.11%),
    linear-gradient(rgba(1, 29, 60, 0) 40%, rgba(1, 29, 60, .62) 58%, rgba(1, 29, 60, .8) 100%);
}
@media (max-width: 1023px) {
  /* schmal steht der Text höher (Titel bis drei Zeilen): Verläufe früher beginnen */
  .ang-objektkopf--foto .ang-hero__foto::after {
    background:
      linear-gradient(rgba(0, 0, 0, .6) 0%, rgba(0, 0, 0, 0) 38%),
      linear-gradient(rgba(0, 0, 0, .32) -5.72%, rgba(0, 0, 0, 0) 35.15%, rgba(0, 0, 0, .32) 85.11%),
      linear-gradient(rgba(1, 29, 60, 0) 18%, rgba(1, 29, 60, .66) 38%, rgba(1, 29, 60, .82) 100%);
  }
}
/* Der Verlauf von links des Übersicht-Heros (styles.css .ang-hero__foto::before, Übersicht v2) gehört nicht in den
   Foto-Kopf: hier tragen nur die drei senkrechten Verläufe oben (Entscheid 1). Gemessen: O-foto «drei Ebenen». */
.ang-objektkopf--foto .ang-hero__foto::before { content: none; }
.ang-objektkopf--foto .parallax { animation: none; }
.ang-objektkopf--foto h1 { max-width: 22em; text-shadow: none; margin-bottom: var(--abstand-2); }

/* ---------- D2 Galerie: eine Liste in Feed-Reihenfolge ---------- */
.ang-galerie { padding-top: var(--abstand-5); }
.ang-galerie__rahmen { position: relative; }
.ang-galerie__liste { list-style: none; display: grid; gap: 8px; margin: 0; padding: 0; }
.ang-galerie__liste > li { position: relative; min-width: 0; min-height: 0; }
.ang-galerie__kachel {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: var(--farbe-flaeche);
  overflow: hidden;
  overflow: clip;
  cursor: zoom-in;
}
.ang-galerie__kachel img { width: 100%; height: 100%; max-width: none; object-fit: cover; transition: scale .6s ease; }
.ang-galerie__kachel:hover img { scale: 1.04; }   /* wie die Projektkarten der Site (nur beim Überfahren, kein Parallax) */
.ang-galerie__kachel::after { content: ""; position: absolute; inset: 0; background: rgba(1, 29, 60, 0); transition: background .3s ease; pointer-events: none; }
.ang-galerie__kachel:hover::after { background: rgba(1, 29, 60, .08); }
.ang-galerie__zaehler { display: none; }
.ang-galerie__alle {
  position: absolute;
  right: var(--abstand-4);
  bottom: var(--abstand-4);
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: var(--abstand-2);
  min-height: 44px;
  padding: 10px 16px;
  border: 0;
  border-radius: 0;
  background: var(--farbe-weiss);
  color: var(--farbe-primaer);
  font: inherit;
  font-size: var(--groesse-klein);
  line-height: var(--zeile-klein);
  font-weight: 700;
  box-shadow: 0 4px 16px rgba(1, 29, 60, .2);
  cursor: pointer;
}
.ang-galerie__alle svg { width: 18px; height: 18px; }
.ang-galerie__alle:hover { background: var(--farbe-hellblau); }
.ang-galerie__alle:focus-visible { outline-offset: -5px; }
.ang-galerie__leer {
  display: grid;
  place-items: center;
  aspect-ratio: auto;   /* styles.css gab der alten Bühne 3 : 2 */
  min-height: 160px;
  margin: 0;
  padding: var(--abstand-5);
  background: var(--farbe-flaeche);
  color: var(--farbe-text-sekundaer);
  text-align: center;
}

/* Bild nicht im Format 3 : 2 (Hochformat, Grundriss 4 : 3 …): ganz zeigen auf der grauen Fläche – nie beschneiden
   (Order 1, DSG-Entscheid 9; die Klasse setzt das Markup aus hero.width/height des Feeds) */
.ang-galerie__liste > .ist-ganz .ang-galerie__kachel img { object-fit: contain; }

/* Mosaik ab 768 px: Titelbild gross links, die nächsten in Feed-Reihenfolge rechts; JEDE Kachel 3 : 2, damit ein Bild
   im Format der Feed-Varianten (1600 × 1067 / 800 × 533) ganz sichtbar ist – auch das Titelbild. Kein Parallax auf der
   Galerie (Review MAJOR-2: das 120-%-Bild schnitt 17 % ab), keine breite Kachel (sie halbierte ein 3 : 2-Bild).
   Gemessen: O6 (Seitenverhältnis jeder sichtbaren Kachel), O-crop (Rand eines Testbilds auf allen vier Seiten sichtbar). */
@media (min-width: 768px) {
  /* ab 3 Bildern (768–1023 px immer, ab 1024 px bei 3 und 4): gross 2/3 links, zwei Kacheln gestapelt rechts, 9 : 4 */
  .ang-galerie__liste { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); grid-template-rows: repeat(2, minmax(0, 1fr)); aspect-ratio: 9 / 4; }
  .ang-galerie__liste > .ist-titelbild { grid-area: 1 / 1 / 3 / 2; }
  .ang-galerie__liste > .ist-ueberzaehlig-mittel { display: none; }
  .ang-galerie__liste[data-bilder="1"] { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); aspect-ratio: 3 / 2; max-width: var(--spalte-text); }
  .ang-galerie__liste[data-bilder="1"] > .ist-titelbild { grid-area: 1 / 1 / 2 / 2; }
  .ang-galerie__liste[data-bilder="2"] { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: minmax(0, 1fr); aspect-ratio: 3 / 1; }
  .ang-galerie__liste[data-bilder="2"] > .ist-titelbild { grid-area: 1 / 1 / 2 / 2; }
  .ang-galerie__kachel:focus-visible { outline-offset: 2px; }
}
@media (min-width: 1024px) {
  /* ab 5 Bildern: Raster 4 × 2 (3 : 1), Titelbild über 2 × 2, vier Kacheln rechts; ab dem sechsten nur in der Lightbox.
     Bei 4 Bildern bleibt das Raster von oben (Titelbild + 2), das vierte zeigt die Lightbox («Alle 4 Bilder»). */
  .ang-galerie__liste:not([data-bilder="1"], [data-bilder="2"], [data-bilder="3"], [data-bilder="4"]) { grid-template-columns: repeat(4, minmax(0, 1fr)); aspect-ratio: 3 / 1; }
  .ang-galerie__liste:not([data-bilder="1"], [data-bilder="2"], [data-bilder="3"], [data-bilder="4"]) > .ist-titelbild { grid-area: 1 / 1 / 3 / 3; }
  /* .ist-ueberzaehlig (ab dem sechsten) trägt auch .ist-ueberzaehlig-mittel und bleibt darum von oben versteckt */
  .ang-galerie__liste:not([data-bilder="4"]) > .ist-ueberzaehlig-mittel:not(.ist-ueberzaehlig) { display: block; }
  .ang-galerie__liste[data-bilder="1"] { max-width: calc((100% - var(--abstand-7)) * 2 / 3); }   /* fluchtet mit der Inhaltsspalte 8/12 */
}
/* Unter 768 px: Wisch-Streifen über die ganze Breite, alle Bilder, Start beim Titelbild */
@media (max-width: 767px) {
  .ang-galerie__rahmen { margin-inline: calc(-1 * var(--rand)); }
  .ang-galerie__liste {
    display: flex;
    gap: 0;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
  }
  .ang-galerie__liste::-webkit-scrollbar { display: none; }
  .ang-galerie__liste > li { flex: 0 0 100%; aspect-ratio: 3 / 2; scroll-snap-align: start; }
  .ang-galerie__kachel { cursor: pointer; }
  .ang-galerie__kachel:focus-visible { outline: 3px solid var(--farbe-primaer); outline-offset: -3px; box-shadow: inset 0 0 0 6px var(--farbe-weiss); }   /* innen: der Streifen schneidet aussen ab */
  .ang-galerie__zaehler {
    position: absolute;
    right: var(--abstand-3);
    bottom: var(--abstand-3);
    display: block;
    padding: 4px 10px;
    background: rgba(1, 29, 60, .82);
    color: var(--farbe-weiss);
    font-size: 13px;
    line-height: 20px;
    font-weight: 700;
    pointer-events: none;
  }
  .ang-galerie__alle { right: auto; left: var(--abstand-3); bottom: var(--abstand-3); }
}

/* ---------- Lightbox (natives <dialog>, schwarz wie die Lightbox der Site) ---------- */
.ang-lightbox {
  width: 100vw;
  max-width: none;
  height: 100vh;
  height: 100dvh;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: #000;
  color: var(--farbe-weiss);
  overflow: hidden;
}
.ang-lightbox::backdrop { background: #000; }
.ang-lightbox[open] { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; }
.ang-lightbox :focus-visible { outline: 2px solid var(--farbe-weiss); outline-offset: 2px; }
.ang-lightbox button {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--farbe-weiss);
  cursor: pointer;
  transition: background .2s ease;
}
.ang-lightbox button:hover { background: rgba(255, 255, 255, .14); }
.ang-lightbox button svg { width: 28px; height: 28px; }
.ang-lightbox__kopf { display: flex; align-items: center; justify-content: space-between; gap: var(--abstand-4); padding: 8px 8px 8px 20px; }
.ang-lightbox__zaehler { margin: 0; font-size: var(--groesse-klein); line-height: var(--zeile-klein); font-variant-numeric: tabular-nums; }
.ang-lightbox__buehne { position: relative; display: grid; min-height: 0; padding: 0 80px; touch-action: pan-y pinch-zoom; }
.ang-lightbox__bild { display: grid; grid-template-rows: minmax(0, 1fr) auto; min-height: 0; margin: 0; }
.ang-lightbox__img { width: 100%; height: 100%; max-width: none; min-height: 0; object-fit: contain; user-select: none; -webkit-user-drag: none; }
.ang-lightbox__text { margin: 0; padding: var(--abstand-3) 0 0; text-align: center; font-size: var(--groesse-klein); line-height: var(--zeile-klein); color: rgba(255, 255, 255, .86); }
.ang-lightbox__pfeil { position: absolute; top: 50%; translate: 0 -50%; }
.ang-lightbox .ang-lightbox__pfeil { width: 56px; height: 56px; background: rgba(255, 255, 255, .08); }
.ang-lightbox__pfeil--zurueck { left: 12px; }
.ang-lightbox__pfeil--weiter { right: 12px; }
.ang-lightbox__leiste { list-style: none; display: flex; justify-content: safe center; gap: 8px; margin: 0; padding: var(--abstand-4) var(--abstand-4) var(--abstand-5); overflow-x: auto; scrollbar-width: thin; }
.ang-lightbox .ang-lightbox__vorschau { display: block; width: 96px; height: 64px; flex: none; opacity: .55; }
.ang-lightbox__vorschau img { width: 100%; height: 100%; object-fit: cover; }
.ang-lightbox .ang-lightbox__vorschau:hover { opacity: .85; background: transparent; }
.ang-lightbox .ang-lightbox__vorschau[aria-current="true"] { opacity: 1; outline: 2px solid var(--farbe-weiss); outline-offset: 2px; }
@media (max-width: 767px) {
  .ang-lightbox__buehne { padding: 0 0 72px; }
  .ang-lightbox__pfeil { top: auto; bottom: 8px; translate: none; }
  .ang-lightbox__pfeil--zurueck { left: 16px; }
  .ang-lightbox__pfeil--weiter { right: 16px; }
  .ang-lightbox__text { padding-inline: 72px; }
  .ang-lightbox__leiste { display: none; }
}

/* ---------- Inhalt: links 8/12, rechts die Anfrage-Karte ---------- */
.ang-detail h3 { margin: 0 0 var(--abstand-3); font-size: var(--groesse-klein); line-height: var(--zeile-klein); color: var(--farbe-primaer-dunkel); }

/* D3 Eckdaten; Miete: Mietzins-Block zuerst */
.ang-eckdaten__kopf { margin: 0 0 var(--abstand-2); font-size: var(--groesse-klein); line-height: var(--zeile-klein); font-weight: 700; color: var(--farbe-text-sekundaer); }
/* keine Linie unten: die Eckdaten-Liste darunter beginnt mit ihren eigenen Linien je Spalte (Review MINOR-3: zwei Linien) */
.ang-eckdaten__mietzins { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 calc(2 * var(--rand)); margin: 0 0 var(--abstand-4); padding: var(--abstand-4) 0 0; border-top: 2px solid var(--farbe-primaer); }
.ang-eckdaten__mietzins dt { font-size: var(--groesse-klein); line-height: var(--zeile-klein); color: var(--farbe-text-sekundaer); }
.ang-eckdaten__mietzins dd { margin: 0; font-size: 20px; line-height: 28px; font-weight: 700; color: var(--farbe-text); }
.ang-eckdaten__mietzins .ist-brutto dd { color: var(--farbe-primaer); }

/* D3 Dokumente (WF3, Vorschlag Vertrag v2): wie Flatfox im Block «Details» nach Bezugstermin/Verfügbarkeit. Jede Zeile ist
   EIN Link (Symbol, Titel, «PDF · 1 kB», «Herunterladen»), mindestens 64 px hoch; Fokusrahmen innen (−2 px), damit er am Rand
   der Liste nicht wegfällt (Entscheid 17: 2 px #011d3c). Unter 520 px rückt «Herunterladen» unter Titel und Grösse. */
.ang-dokumente { margin-top: var(--abstand-5); }
/* Überschrift wie die übrigen H3 der Seite («Highlights», «Weitere Angaben»: --farbe-primaer-dunkel), nicht grau (Review UX-6) */
.ang-detail .ang-dokumente__titel { margin: 0 0 var(--abstand-2); font-size: var(--groesse-klein); line-height: var(--zeile-klein); font-weight: 700; color: var(--farbe-primaer-dunkel); }
.ang-dokumente__liste { margin: 0; padding: 0; list-style: none; }
.ang-dokument {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) auto;
  grid-template-areas: "symbol text aktion";
  align-items: center;
  gap: 4px var(--abstand-4);
  min-height: 64px;
  padding: var(--abstand-3) var(--abstand-2);
  border-top: 1px solid var(--farbe-linie);
  color: var(--farbe-text);
  text-decoration: none;
  transition: background-color .2s ease;
}
.ang-dokumente__liste li:last-child .ang-dokument { border-bottom: 1px solid var(--farbe-linie); }
.ang-dokument__symbol { grid-area: symbol; width: 32px; height: 32px; color: var(--farbe-primaer); }
.ang-dokument__text { grid-area: text; display: grid; min-width: 0; }
.ang-dokument__titel { font-weight: 700; color: var(--farbe-primaer-dunkel); overflow-wrap: anywhere; }
.ang-dokument__meta { font-size: var(--groesse-klein); line-height: var(--zeile-klein); color: var(--farbe-text-sekundaer); }
/* Komma nur für Screenreader («PDF, 1 kB» statt «PDF Punkt 1 kB»): Schriftgrösse 0 statt .ang-nur-sr – ein absolut
   positioniertes Element bekäme im zugänglichen Namen Leerzeichen davor («PDF , 1 kB», gemessen O-dok3) */
.ang-dokument__komma { font-size: 0; line-height: 0; }   /* line-height 0: sonst wird die Zeile 6 px höher (gemessen O-dok5) */
.ang-dokument__aktion { grid-area: aktion; display: inline-flex; align-items: center; gap: 6px; font-weight: 700; color: var(--farbe-primaer); white-space: nowrap; }
.ang-dokument__pfeil { flex: none; width: 20px; height: 20px; }
.ang-dokument:hover { background: var(--ang-aktiv-flaeche); }
.ang-dokument:hover .ang-dokument__titel { text-decoration: underline; }
.ang-dokument:focus-visible { outline: 2px solid var(--farbe-primaer-dunkel); outline-offset: -2px; }
.ang-dokumente__hinweis { margin: var(--abstand-3) 0 0; font-size: var(--groesse-klein); line-height: var(--zeile-klein); color: var(--farbe-text-sekundaer); }
@media (max-width: 519px) {
  .ang-dokument { grid-template-columns: 32px minmax(0, 1fr); grid-template-areas: "symbol text" "symbol aktion"; }
  .ang-dokument__aktion { justify-self: start; }
}
@media (prefers-reduced-motion: reduce) { .ang-dokument { transition: none; } }

/* D4a Anfrage-Karte: nur Preis, Kernwerte und Knöpfe (das Formular steht in #anfrage) */
.ang-anfrage { padding: 32px; }
.ang-anfrage__label { margin: 0; font-size: var(--groesse-klein); line-height: var(--zeile-klein); color: var(--farbe-text-sekundaer); }
.ang-anfrage__preis { font-size: 32px; line-height: 40px; overflow-wrap: anywhere; }
.ang-anfrage__eckwerte { margin: var(--abstand-1) 0 0; font-size: var(--groesse-klein); line-height: var(--zeile-klein); }
.ang-anfrage__aktionen { display: grid; gap: var(--abstand-3); margin-top: var(--abstand-5); }
.ang-anfrage__aktionen .knopf { justify-content: center; }
.ang-anfrage__telefon { margin: var(--abstand-1) 0 0; text-align: center; }
.ang-anfrage__telefon a { white-space: nowrap; }
@media (min-width: 1024px) and (max-width: 1199px) {
  .ang-anfrage { padding: var(--abstand-5); }
  .ang-anfrage__preis { font-size: 26px; line-height: 32px; }
}

/* D5–D7 */
.ang-beschreibung p:last-child { margin-bottom: 0; }
.ang-ausstattung { list-style: none; display: flex; flex-wrap: wrap; gap: var(--abstand-2); margin: 0 0 var(--abstand-5); padding: 0; }
.ang-ausstattung li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px 6px 10px;
  background: var(--farbe-hellblau);
  color: var(--farbe-primaer-dunkel);
  font-size: var(--groesse-klein);
  line-height: var(--zeile-klein);
}
.ang-ausstattung li::before {
  content: "";
  width: 18px;
  height: 18px;
  flex: none;
  background: var(--farbe-primaer);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5' fill='none' stroke='%23000' stroke-width='2'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5' fill='none' stroke='%23000' stroke-width='2'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* D8 Lage: feste Höhe (kein Springen beim Laden), Karte erst in Sichtnähe */
.ang-lage__karte { aspect-ratio: auto; height: 280px; }
.ang-lage__statisch { display: grid; place-content: center; justify-items: center; gap: var(--abstand-2); height: 100%; padding: var(--abstand-4); text-align: center; color: var(--farbe-text-sekundaer); }
.ang-lage__statisch p { margin: 0; font-size: var(--groesse-klein); line-height: var(--zeile-klein); }
.ang-lage__hinweis { display: none; margin: var(--abstand-2) 0 0; font-size: var(--groesse-klein); line-height: var(--zeile-klein); color: var(--farbe-text-sekundaer); }
@media (pointer: coarse) { .ang-lage__hinweis { display: block; } }
.ang-lage__links { list-style: none; display: flex; flex-wrap: wrap; gap: var(--abstand-2) var(--abstand-5); margin: var(--abstand-3) 0 0; padding: 0; font-size: var(--groesse-klein); line-height: var(--zeile-klein); }
.ang-lage__links a { display: inline-block; padding-block: 10px; }
/* Karte v3 (MapLibre, Grundkarte der Bewertungskarte ohne Einrichtungen): Bedienelemente eckig, 44 × 44 wie bisher; MapLibre
   lädt sein CSS nach diesem – darum .ang-lage__karte davor (Spezifität). Kartenpapier #eef1f3 wie der Stil. */
.ang-lage__karte.maplibregl-map { font: 14px/20px var(--schrift); background: #eef1f3; }
.ang-lage__karte .maplibregl-ctrl-group { border: 1px solid var(--farbe-linie-dunkel); border-radius: 0; box-shadow: 0 2px 8px rgba(1, 29, 60, .12); }
.ang-lage__karte .maplibregl-ctrl-group button { width: 44px; height: 44px; border-radius: 0; }
.ang-lage__karte .maplibregl-ctrl-group button + button { border-top: 1px solid var(--farbe-linie); }
.ang-lage__karte .maplibregl-ctrl button:not(:disabled):hover { background-color: var(--ang-aktiv-flaeche); }
.ang-lage__karte .maplibregl-ctrl button:disabled { background-color: #f4f4f4; }
.ang-lage__karte .maplibregl-ctrl-group button:focus:focus-visible { border-radius: 0; box-shadow: none; outline: 2px solid var(--farbe-primaer-dunkel); outline-offset: -3px; }
.ang-lage__karte .maplibregl-canvas:focus-visible { outline: 2px solid var(--farbe-primaer-dunkel); outline-offset: -3px; }
.ang-lage__karte .maplibregl-ctrl.maplibregl-ctrl-attrib { padding: 2px 8px; background: rgba(255, 255, 255, .92); color: var(--farbe-text-sekundaer); font-size: 12px; line-height: 18px; }
.ang-lage__karte .maplibregl-ctrl-attrib a { color: var(--farbe-primaer); text-decoration: underline; }
.ang-lage__karte .maplibregl-ctrl-attrib a:focus-visible { outline: 2px solid var(--farbe-primaer-dunkel); outline-offset: -2px; }
.ang-lage__pin { display: block; pointer-events: none; }
.ang-lage__pin svg { display: block; filter: drop-shadow(0 2px 3px rgba(1, 29, 60, .35)); }
.ang-lage__statisch .ang-lage__ohne-webgl { max-width: 40ch; color: var(--farbe-text); }
@media (min-width: 1024px) { .ang-lage__karte { height: 360px; } }

/* D4b Kontakt #anfrage: Formular im Inhalt (nie in der «sticky» Karte – zu hoch) */
.ang-kontakt { padding: var(--karte-innen); background: var(--farbe-flaeche); border-top: 2px solid var(--farbe-primaer); }
.ang-kontakt h2 { margin-bottom: var(--abstand-2); }
.ang-kontakt h2:focus { outline: none; }
.ang-kontakt h3 { margin-top: var(--abstand-6); padding-top: var(--abstand-5); border-top: 1px solid var(--farbe-linie-dunkel); }
.ang-kontakt__text { max-width: 60ch; margin-bottom: var(--abstand-5); }
.ang-kontakt__weitere { display: flex; flex-wrap: wrap; align-items: center; gap: var(--abstand-3) var(--abstand-5); }
.ang-kontakt__telefon { margin: 0; font-size: var(--groesse-klein); line-height: var(--zeile-klein); color: var(--farbe-text-sekundaer); }
.ang-kontakt__telefon a { white-space: nowrap; }
.ang-formular + .ang-kontakt__telefon { margin-top: var(--abstand-5); }   /* Kauf ohne Mailgate: nicht am Knopf kleben */
.ang-formular { display: grid; gap: var(--abstand-4); max-width: 640px; }
.ang-formular__zeile { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--abstand-4); }
.ang-feld { display: grid; gap: 6px; align-content: start; min-width: 0; }
.ang-feld__hilfe { margin: 0; font-size: 13px; line-height: 18px; color: var(--farbe-text-sekundaer); }
textarea.ang-eingabe { height: auto; min-height: 132px; padding: 12px 14px; resize: vertical; }
.ang-formular .ang-einwilligung { font-size: 14px; line-height: 21px; }
.ang-formular .knopf { justify-self: start; border-radius: 0; font: inherit; cursor: pointer; }
.ang-feldfehler { margin: -6px 0 0; font-size: 14px; line-height: 20px; font-weight: 700; color: #b91c1c; }   /* 6,1 : 1 auf #fafafa */
.ang-eingabe[aria-invalid="true"] { border-color: #b91c1c; box-shadow: 0 0 0 1px #b91c1c; }
.ang-einwilligung:has(input[aria-invalid="true"]) { color: #b91c1c; }
.ang-formular__meldung { margin: 0; padding: var(--abstand-3); background: var(--farbe-hellblau); font-size: var(--groesse-klein); line-height: var(--zeile-klein); }
.ang-formular__meldung[hidden] { display: none; }
/* Besichtigung bei Kauf mit Mailgate: aufklappbar (<details>, geht auch ohne JavaScript) */
.ang-klappe { margin-bottom: var(--abstand-4); }
.ang-klappe > summary { list-style: none; cursor: pointer; }
.ang-klappe > summary::-webkit-details-marker { display: none; }
.ang-klappe > summary::after { content: ""; width: 10px; height: 10px; margin-left: var(--abstand-2); border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; translate: 0 -3px; rotate: 45deg; }
.ang-klappe[open] > summary::after { translate: 0 2px; rotate: 225deg; }
.ang-klappe[open] > summary { margin-bottom: var(--abstand-5); }
.ang-klappe .ang-formular { margin-bottom: var(--abstand-5); }
.ang-kontakt__ohne-js { margin: var(--abstand-4) 0 0; padding: var(--abstand-3); background: var(--farbe-weiss); border-left: 3px solid var(--farbe-primaer); font-size: var(--groesse-klein); line-height: var(--zeile-klein); }
.ang-turnstile { display: grid; place-items: center; width: 300px; max-width: 100%; height: 65px; border: 1px dashed var(--farbe-linie-dunkel); background: var(--farbe-weiss); font-size: 13px; line-height: 18px; color: var(--farbe-text-sekundaer); }
.ang-honig { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.ang-anbieter { margin: var(--abstand-6) 0 0; padding-top: var(--abstand-4); border-top: 1px solid var(--farbe-linie-dunkel); font-size: var(--groesse-klein); line-height: var(--zeile-klein); color: var(--farbe-text-sekundaer); }

/* D10 Weitere Objekte (Karten wie die Übersicht) */
.ang-weitere { padding: 0 0 var(--abstand-7); }
.ang-weitere__kopf { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: var(--abstand-2) var(--abstand-5); margin-bottom: var(--abstand-5); padding-top: var(--abstand-7); border-top: 1px solid var(--farbe-linie); }
.ang-weitere__kopf h2 { margin: 0; font-size: var(--groesse-h3); line-height: var(--zeile-h3); color: var(--farbe-primaer-dunkel); }
.ang-weitere__alle { font-size: var(--groesse-klein); line-height: var(--zeile-klein); }
@media (min-width: 1024px) { .ang-weitere__liste { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
/* 520–1023 px: zwei Karten je Zeile – die dritte fiele allein in eine Zeile (Review NIT-10) */
@media (min-width: 520px) and (max-width: 1023px) { .ang-weitere__liste > li:nth-child(n + 3) { display: none; } }

/* D9 Zurück und Stand */
.ang-fuss-zeile { margin-bottom: var(--abschnitt-y); }

/* ---------- Aktionsleiste unter 1024 px ---------- */
.ang-aktionsleiste { display: none; }

/* ---------- Stufen ---------- */
@media (max-width: 1023px) {
  html { scroll-padding-bottom: 80px; }   /* Fokus nie unter der Aktionsleiste (WCAG 2.4.11) */
  .ang-detail > .ang-anfrage { display: none; }   /* unter 1024 px übernimmt die Aktionsleiste */
  .ang-objektkopf { padding-bottom: var(--abstand-6); }
  .ang-objektkopf__raster { gap: var(--abstand-4); }
  .ang-objektkopf__aktion { justify-items: start; }
  .ang-objektkopf__preis { text-align: left; }
  .ang-objektkopf__betrag { font-size: 28px; line-height: 34px; }
  .ang-objektkopf__cta { display: none; }   /* die Aktionsleiste trägt denselben Knopf */
  .ang-aktionsleiste {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 40;
    display: block;
    padding-bottom: env(safe-area-inset-bottom);
    background: var(--farbe-weiss);
    border-top: 1px solid var(--farbe-linie-dunkel);
    box-shadow: 0 -8px 24px rgba(1, 29, 60, .08);
    transition: transform .25s ease, visibility 0s linear 0s;
  }
  .ang-aktionsleiste.ist-verborgen { visibility: hidden; transform: translateY(100%); transition: transform .25s ease, visibility 0s linear .25s; }
  /* Preis links (wächst, darf schrumpfen), Telefon und Knopf rechts fest – nichts überlappt (Review MAJOR-1, O10b) */
  .ang-aktionsleiste__innen { display: flex; align-items: center; gap: var(--abstand-3); height: 64px; max-width: var(--breite); margin-inline: auto; padding-inline: var(--rand); }
  .ang-aktionsleiste__preis { display: grid; flex: 1 1 auto; min-width: 0; margin: 0; }
  .ang-aktionsleiste__betrag { font-size: 18px; line-height: 22px; font-weight: 700; color: var(--farbe-primaer); white-space: nowrap; }
  .ang-aktionsleiste__betrag.ist-anfrage { white-space: normal; text-wrap: balance; }   /* «Preis auf Anfrage» darf zweizeilig */
  .ang-aktionsleiste__zusatz { font-size: 13px; line-height: 18px; color: var(--farbe-text-sekundaer); white-space: nowrap; }
  .ang-aktionsleiste__telefon { display: grid; place-items: center; flex: none; width: 48px; height: 48px; border: 1px solid var(--farbe-primaer-dunkel); color: var(--farbe-primaer-dunkel); }
  .ang-aktionsleiste__telefon svg { width: 22px; height: 22px; }
  .ang-aktionsleiste__cta { flex: none; min-height: 48px; padding: 11px 16px; font-size: 16px; line-height: 24px; font-weight: 700; white-space: nowrap; }
  /* «.knopf > span { display: inline-flex }» aus styles.css hat 0,1,1 – darum hier Elternklasse + Kindklasse (0,2,0) */
  .ang-aktionsleiste__cta > .ang-aktionsleiste__kurz { display: none; }
}
/* Unter 430 px trägt der Knopf die Kurzform («Exposé», «Unterlagen», «Anfragen»; Name bleibt der volle Text) */
@media (max-width: 429px) {
  .ang-aktionsleiste__cta > .ang-aktionsleiste__lang { display: none; }
  .ang-aktionsleiste__cta > .ang-aktionsleiste__kurz { display: inline-flex; }
  .ang-aktionsleiste__betrag { font-size: 17px; }
}
@media (max-width: 767px) {
  .ang-objektkopf__raster { grid-template-columns: minmax(0, 1fr); gap: var(--abstand-3); }
  .ang-eckdaten__mietzins { grid-template-columns: minmax(0, 1fr); gap: var(--abstand-2); }
  .ang-eckdaten__mietzins > div { display: flex; justify-content: space-between; align-items: baseline; gap: var(--abstand-4); }
  .ang-eckdaten__mietzins dd { font-size: 18px; line-height: 24px; }
  .ang-kontakt { margin-inline: calc(-1 * var(--rand)); padding: var(--abstand-6) var(--rand); }
}
@media (max-width: 519px) {
  .ang-formular__zeile { grid-template-columns: minmax(0, 1fr); }
  .ang-eckdaten__liste { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ang-aktionsleiste__cta { padding-inline: 12px; }
}

/* «Bewegung reduzieren»: kein Zoom, keine Übergänge, kein Parallax (Lenis startet dann gar nicht) */
@media (prefers-reduced-motion: reduce) {
  .ang-aktionsleiste, .ang-aktionsleiste.ist-verborgen, .ang-galerie__kachel img, .ang-galerie__kachel::after, .ang-lightbox button { transition-duration: 0s; transition-delay: 0s; }
  .ang-galerie__kachel:hover img { scale: none; }
  .ang-objektkopf--foto .parallax { transform: none !important; }
}

/* mlg-immobilien-sync 0.4.0 (Bricks-Rückmeldung Etappe 1, Punkt 4): ein verborgener Kartencontainer bleibt verborgen
   (Gurt; mit F2 ist die Lage-Karte aktiv). */
.ang-lage__karte[hidden] { display: none; }
