/* Archivo liegt bei der Seite: kein Abruf bei Google Fonts */
@font-face { font-family: "Archivo"; font-style: normal; font-weight: 400 700; font-stretch: 100% 125%; font-display: swap; src: url(../fonts/archivo-latin-ext.woff2) format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Archivo"; font-style: normal; font-weight: 400 700; font-stretch: 100% 125%; font-display: swap; src: url(../fonts/archivo-latin.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
:root {
  /* Zwei Zustände derselben Seite. Ohne .immersiv: Wohnungsseite, das Modell ist eine Vorschau und die Seite scrollt.
     Mit .immersiv: Das Modell füllt die Fläche, Karten und Leisten liegen darüber (Telefon: Blätter von unten;
     Bildschirm: Wohnungskarte links, „Wohnung entdecken“ rechts, Ansichten unten). */
  --weiss: #ffffff;
  --grund: #f4f2ed;
  --tinte: #16301f;
  --tinte-70: #47594c;
  --gruen: #1f7d33;
  --gruen-hell: #dcf2e1;
  --gruen-50: #f0f9f2;
  --linie: #ddd7cc;
  --schatten: 0 1px 2px rgba(22, 48, 31, 0.06), 0 8px 28px rgba(22, 48, 31, 0.1);
  --radius: 14px;
  --font: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --unten: env(safe-area-inset-bottom, 0px);
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
html.gesperrt, html.gesperrt body { height: 100%; overflow: hidden; }
body { background: var(--grund); color: var(--tinte); font-family: var(--font); font-size: 14px; line-height: 1.45; -webkit-font-smoothing: antialiased; -webkit-text-size-adjust: 100%; }
h1, h2, h3, h4, p, ul, dl, dd { margin: 0; }
ul { padding: 0; list-style: none; }
button { font: inherit; color: inherit; -webkit-tap-highlight-color: transparent; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
[hidden] { display: none !important; }

.app { position: relative; }
.app.immersiv { position: fixed; inset: 0; overflow: hidden; }
.stage { position: relative; background: radial-gradient(120% 90% at 50% 40%, #fdfcfa 0%, #f1eee8 55%, #e6e1d8 100%); }
.immersiv .stage { position: absolute; inset: 0; touch-action: none; }
.stage canvas { display: block; position: relative; width: 100%; height: 100%; outline: none; opacity: 0; transition: opacity 0.5s; }
.bereit .stage canvas { opacity: 1; }
.stage canvas:focus-visible { outline: 2px solid var(--gruen); outline-offset: -6px; }
/* Vorschaubild aus dem Modell selbst: steht sofort da und blendet in die 3D-Ansicht über */
.poster { position: absolute; inset: 4%; pointer-events: none; transition: opacity 0.5s; }
.poster img { display: block; width: 100%; height: 100%; object-fit: contain; }
.bereit .poster, .ohne-3d .poster { opacity: 0; }
.immersiv .poster { inset: 96px 14px calc(150px + var(--unten)); }
.labels { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }

/* Raumbeschriftung */
.lbl { position: absolute; left: 0; top: 0; white-space: nowrap; text-align: center; padding: 3px 8px; border-radius: 6px; background: rgba(255, 255, 255, 0.9); color: var(--tinte); font-size: 11px; line-height: 1.25; box-shadow: 0 1px 2px rgba(22, 48, 31, 0.14); will-change: transform; }
.lbl b { display: block; font-weight: 600; letter-spacing: 0.01em; }
.lbl span { display: block; color: var(--tinte-70); font-variant-numeric: tabular-nums; font-size: 10.5px; }
.labels[data-modus="namen"] .lbl-raum span, .labels[data-modus="aus"] .lbl-raum span { display: none; }
.lbl.gewaehlt { background: var(--gruen); color: #fff; padding: 5px 10px; font-size: 12px; }
.lbl.gewaehlt span { display: block !important; color: rgba(255, 255, 255, 0.86); }
.lbl-zone { background: #fff; border-left: 4px solid var(--zone); border-radius: 4px 6px 6px 4px; font-size: 11.5px; }
.lbl-zone.gewaehlt { background: var(--tinte); }
.lbl-ebene { text-align: left; background: var(--tinte); color: #fff; padding: 5px 10px; box-shadow: none; }
.lbl-ebene b { font-size: 11.5px; letter-spacing: 0.04em; }
.lbl-ebene span { color: rgba(255, 255, 255, 0.78); }

/* Karten und Text */
.card, .panel, .dialog { background: var(--weiss); border-radius: var(--radius); box-shadow: var(--schatten); }
.eyebrow { font-size: 10.5px; font-weight: 600; letter-spacing: 0.13em; text-transform: uppercase; color: var(--gruen); }
h1 { font-size: 22px; font-weight: 700; font-stretch: 116%; line-height: 1.1; }
h2 { font-size: 18px; font-weight: 700; font-stretch: 112%; line-height: 1.15; text-wrap: balance; }
h3, h4 { font-size: 10.5px; font-weight: 600; letter-spacing: 0.13em; text-transform: uppercase; color: var(--tinte-70); margin-bottom: 7px; }
.meta { color: var(--tinte-70); font-size: 13px; }
.meta strong { color: var(--tinte); font-weight: 600; white-space: nowrap; }
.kennzahl { display: flex; align-items: baseline; gap: 8px; }
.kennzahl strong { white-space: nowrap; font-size: 24px; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.kennzahl span { color: var(--tinte-70); font-size: 13px; }
button.kennzahl { width: 100%; padding: 0; border: 0; background: none; text-align: left; cursor: pointer; border-radius: 6px; }
button.kennzahl:hover strong { color: var(--gruen); }
.highlight .titel { font-size: 17px; font-weight: 700; font-stretch: 110%; line-height: 1.2; }
.highlight .text { margin-top: 4px; color: var(--tinte-70); font-size: 14px; }

/* Kennzahlen: Zeilen mit Pfeil zeigen ihre Fläche im Modell */
.werte { border-top: 1px solid var(--linie); }
.zeile { display: flex; align-items: baseline; gap: 10px; width: 100%; min-height: 44px; padding: 10px 22px 10px 0; border: 0; border-bottom: 1px solid var(--linie); background: none; text-align: left; }
.zeile .name { flex: 1 1 auto; color: var(--tinte-70); }
.zeile .name small { display: block; font-size: 11px; opacity: 0.85; }
.zeile .wert { font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
button.zeile { position: relative; cursor: pointer; transition: background 0.15s; }
button.zeile svg { position: absolute; right: 2px; top: 50%; width: 16px; height: 16px; margin-top: -8px; fill: none; stroke: var(--gruen); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
button.zeile .name { color: var(--tinte); text-decoration: underline; text-decoration-color: #b9d8bf; text-underline-offset: 3px; }
button.zeile .name small { display: block; text-decoration: none; color: var(--tinte-70); }
button.zeile:hover { background: var(--gruen-50); }
button.zeile[aria-pressed="true"] { background: var(--gruen-50); box-shadow: inset 3px 0 0 var(--gruen); padding-left: 10px; }
button.zeile[aria-pressed="true"] .name { font-weight: 600; text-decoration: none; }

.quelle, .hilfe, .rechtlich { font-size: 11.5px; line-height: 1.45; color: var(--tinte-70); }
.hilfe { font-size: 12.5px; }
.aktionen { display: flex; gap: 8px; flex-wrap: wrap; }
.info .aktionen { flex-wrap: nowrap; }
.info .aktionen .btn.primary { min-width: 0; padding: 0 12px; white-space: nowrap; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: 999px; border: 1px solid var(--linie); background: var(--weiss); font-weight: 600; font-size: 14px; cursor: pointer; text-decoration: none; color: var(--tinte); transition: background 0.15s, border-color 0.15s, transform 0.1s; }
.btn:hover { background: var(--gruen-50); border-color: #b9d8bf; }
.btn:active { transform: scale(0.98); }
.btn.primary { background: var(--gruen); border-color: var(--gruen); color: #fff; flex: 1 1 auto; }
.btn.primary:hover { background: #17632a; border-color: #17632a; }
.btn.ghost { border-color: transparent; background: transparent; color: var(--tinte-70); }
.btn.ghost:hover { background: var(--gruen-50); }
.btn.icon { width: 44px; padding: 0; flex: 0 0 auto; }
.btn svg, .icon-btn svg, .link svg, .pille svg, .zurueck svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: 0 0 auto; }
.fav[aria-pressed="true"] { color: var(--gruen); border-color: #b9d8bf; background: var(--gruen-50); }
.fav[aria-pressed="true"] svg { fill: currentColor; }
.icon-btn { display: inline-grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 999px; background: transparent; cursor: pointer; color: var(--tinte-70); flex: 0 0 auto; }
.icon-btn:hover { background: var(--gruen-50); color: var(--tinte); }
.icon-btn.rund { background: var(--weiss); box-shadow: var(--schatten); color: var(--tinte); }
:focus-visible { outline: 2px solid var(--gruen); outline-offset: 2px; }

/* Umschalter */
.seg { display: flex; gap: 2px; padding: 3px; border-radius: 999px; background: #efece6; }
.seg button { flex: 1 1 0; min-height: 44px; padding: 0 10px; border: 0; border-radius: 999px; background: transparent; font-size: 13px; font-weight: 600; color: var(--tinte-70); cursor: pointer; white-space: nowrap; transition: background 0.18s, color 0.18s; }
.seg button:hover { color: var(--tinte); }
.seg button[aria-pressed="true"] { background: var(--weiss); color: var(--tinte); box-shadow: 0 1px 3px rgba(22, 48, 31, 0.16); }
.seg.stark { background: var(--weiss); box-shadow: var(--schatten); padding: 4px; }
.seg.stark button { min-height: 44px; padding: 0 14px; }
.seg.stark button[aria-pressed="true"] { background: var(--gruen); color: #fff; box-shadow: none; }

.schalter { display: flex; width: 100%; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; padding: 0; border: 0; background: none; font-weight: 600; font-size: 14px; cursor: pointer; text-align: left; }
.schalter i { position: relative; flex: 0 0 auto; width: 42px; height: 24px; border-radius: 999px; background: #d8d3c9; transition: background 0.18s; }
.schalter i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25); transition: transform 0.18s; }
.schalter[aria-pressed="true"] i { background: var(--gruen); }
.schalter[aria-pressed="true"] i::after { transform: translateX(18px); }
.zonen, .chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 7px; min-height: 44px; padding: 0 13px; border-radius: 999px; border: 1px solid var(--linie); background: var(--weiss); font-size: 13px; font-weight: 600; cursor: pointer; }
.chip i { width: 10px; height: 10px; border-radius: 3px; background: var(--zone, var(--gruen)); }
.chip[aria-pressed="true"] { background: var(--tinte); border-color: var(--tinte); color: #fff; }
.chip:hover { border-color: #b9d8bf; }
.link { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 44px; padding: 0; border: 0; background: none; font-weight: 600; font-size: 13.5px; cursor: pointer; text-align: left; color: var(--tinte); }
.link:hover { color: var(--gruen); }
.zahl { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--gruen); color: #fff; font-size: 11px; font-variant-numeric: tabular-nums; }
.gruppe { display: grid; gap: 8px; padding-top: 14px; border-top: 1px solid var(--linie); }
.gruppe.links { gap: 0; padding-top: 6px; }
.sheet-kopf { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.pille { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px 0 12px; border: 0; border-radius: 999px; background: var(--weiss); box-shadow: var(--schatten); font-weight: 600; font-size: 13.5px; cursor: pointer; white-space: nowrap; }
.pille[aria-pressed="true"] { background: var(--tinte); color: #fff; }
.hinweis { padding: 6px 12px; border-radius: 10px; background: rgba(255, 255, 255, 0.92); font-size: 11.5px; line-height: 1.4; color: var(--tinte-70); text-wrap: balance; }

/* ---------- 3D-Ansicht, Telefon ---------- */
.nur-desktop { display: none !important; }
.zurueck, .vorschau-leiste, .raeume, .rechtlich.seite, .rechtlich.kurz, .highlight, .meta.lang { display: none; }
/* Telefon: der Rechtshinweis bleibt unter der Kopfkarte lesbar; Antippen klappt die Karte mit dem vollen Text auf */
.immersiv .rechtlich.kurz { display: block; position: absolute; top: var(--kopf-unten, 84px); left: 16px; right: 16px; z-index: 4; min-height: 44px; padding: 6px 0; border: 0; background: none; text-align: left; font: inherit; font-size: 11px; line-height: 1.35; color: var(--tinte-70); cursor: pointer; }
.rechtlich.kurz span { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.app:has(.info.offen) .rechtlich.kurz, .ohne-3d .rechtlich.kurz { display: none; }
.info { position: absolute; top: max(10px, env(safe-area-inset-top, 0px)); left: 10px; right: 10px; padding: 8px 6px 8px 14px; display: grid; gap: 6px; z-index: 5; max-height: calc(100% - 20px); overflow-y: auto; overscroll-behavior: contain; }
.info-kopf { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.info-kopf > div:first-child { display: flex; align-items: baseline; flex-wrap: wrap; gap: 2px 10px; }
.info-knoepfe { display: flex; flex: 0 0 auto; }
.info .eyebrow { flex-basis: 100%; }
.info > .kennzahl { display: none; }
.info-mehr { display: none; gap: 10px; padding-right: 8px; }
.info .aktionen.haupt { display: none; }
.info.offen .info-mehr { display: grid; }
.info.offen > .kennzahl { display: flex; min-height: 44px; }
.info.offen #info-toggle svg { transform: rotate(180deg); }

.dock { position: absolute; left: 10px; right: 10px; bottom: max(10px, var(--unten)); z-index: 5; display: grid; gap: 8px; }
.dock .seg.stark button { padding: 0 6px; font-size: 12.5px; }
.dock-extra { position: absolute; right: 0; bottom: calc(100% + 10px); display: grid; gap: 8px; }
.kontext { position: absolute; left: 0; right: 56px; bottom: calc(100% + 10px); display: grid; justify-items: start; gap: 8px; }
/* Unter einem offenen Blatt ist die Leiste nicht bedienbar und würde durchschimmern. */
@media (max-width: 899px), (max-height: 619px) { .app:has(.room:not([hidden])) .dock, .app:has(.explore.offen) .dock { visibility: hidden; } }
.dock-mobil { display: flex; gap: 8px; }
.dock-mobil .btn { flex: 1 1 0; background: var(--weiss); box-shadow: var(--schatten); border-color: transparent; }
.dock-mobil .btn.primary { background: var(--gruen); }
.dock-mobil .btn.icon { flex: 0 0 44px; }

/* Nicht ganz deckend: Chromium hält ein deckendes, scrollendes Blatt sonst für eine Abdeckung der ganzen 3D-Fläche und blendet sie aus. */
.sheet { background-color: rgba(255, 255, 255, 0.99); position: absolute; left: 0; right: 0; bottom: 0; z-index: 8; padding: 18px 16px calc(16px + var(--unten)); display: grid; gap: 12px; border-radius: 18px 18px 0 0; max-height: 62%; overflow-y: auto; overscroll-behavior: contain; box-shadow: 0 -8px 30px rgba(22, 48, 31, 0.16); animation: hoch 0.26s cubic-bezier(0.2, 0.8, 0.2, 1); }
.sheet::before { content: ""; position: absolute; top: 7px; left: 50%; width: 36px; height: 4px; margin-left: -18px; border-radius: 4px; background: #d8d3c9; }
.explore:not(.offen) { display: none; }
@keyframes hoch { from { transform: translateY(24px); opacity: 0; } }

.panel.plan { position: fixed; inset: 0; z-index: 12; border-radius: 0; padding: 16px 16px calc(16px + var(--unten)); display: grid; grid-template-rows: auto 1fr auto auto; gap: 12px; }
.plan-bild { display: grid; align-content: safe center; overflow: auto; border: 1px solid var(--linie); border-radius: 10px; background: #fff; overscroll-behavior: contain; }
.plan-bild img { display: block; width: 100%; height: auto; }
.plan-bild.gross img { width: 240%; max-width: none; }

.overlay { position: fixed; inset: 0; z-index: 20; background: rgba(22, 48, 31, 0.32); display: grid; align-items: end; }
.dialog { width: 100%; max-height: 92%; overflow-y: auto; padding: 18px 16px calc(16px + var(--unten)); display: grid; gap: 14px; border-radius: 18px 18px 0 0; animation: hoch 0.26s cubic-bezier(0.2, 0.8, 0.2, 1); overscroll-behavior: contain; }
.tabelle { overflow-x: auto; border: 1px solid var(--linie); border-radius: 10px; }
.tabelle table { border-collapse: collapse; width: 100%; font-size: 13px; }
.tabelle th, .tabelle td { padding: 9px 12px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--linie); font-variant-numeric: tabular-nums; }
.tabelle tr:last-child th, .tabelle tr:last-child td { border-bottom: 0; }
.tabelle thead th { font-size: 15px; font-weight: 700; white-space: nowrap; background: #faf9f6; }
.tabelle thead th .fav { vertical-align: middle; margin-left: 4px; width: 32px; min-height: 32px; height: 32px; }
.tabelle tbody th { font-weight: 400; color: var(--tinte-70); white-space: nowrap; position: sticky; left: 0; background: #fff; }
.tabelle td small { display: block; color: var(--tinte-70); }
.tabelle .leer { color: var(--tinte-70); padding: 18px 12px; }
.feld { font-size: 10.5px; font-weight: 600; letter-spacing: 0.13em; text-transform: uppercase; color: var(--tinte-70); margin-bottom: -8px; }
textarea { width: 100%; padding: 12px; border: 1px solid var(--linie); border-radius: 10px; font: inherit; font-size: 16px; color: inherit; resize: vertical; background: #fff; }
.kontakt { font-size: 13.5px; }
.tag { display: inline-flex; align-items: center; min-height: 30px; padding: 0 12px; border-radius: 999px; background: var(--gruen-hell); font-weight: 600; font-size: 13px; }

/* Ohne 3D: Der Verkaufsplan steht an der Stelle des Modells, die Seite bleibt vollständig. */
.fallback { position: absolute; inset: 0; display: grid; grid-template-rows: auto minmax(0, 1fr); gap: 10px; padding: 14px; background: var(--weiss); }
.fallback img { width: 100%; height: 100%; min-height: 0; object-fit: contain; }
.ohne-3d .vorschau-leiste { display: none !important; }

/* ---------- 3D-Ansicht, Bildschirm ---------- */
@media (min-width: 900px) and (min-height: 620px) {
  .nur-mobil { display: none !important; }
  .nur-desktop { display: flex !important; }
  p.nur-desktop { display: block !important; }
  .immersiv .poster { inset: 28px 346px 112px; }
  .info { top: 20px; left: 20px; right: auto; width: 300px; padding: 20px; gap: 12px; max-height: calc(100% - 40px); }
  .info-kopf { align-items: flex-start; }
  .info-kopf > div:first-child { display: block; }
  .info-knoepfe { margin: -8px -10px 0 0; }
  h1 { font-size: 34px; margin: 2px 0 4px; }
  .meta.lang { display: block; }
  .meta.kurz { display: none; }
  .highlight { display: block; }
  .highlight .titel { font-size: 14px; font-stretch: 100%; font-weight: 600; }
  .highlight .text { display: none; }
  .info > .kennzahl { display: flex; }
  .kennzahl strong { font-size: 28px; }
  .info-mehr { display: grid; gap: 14px; padding: 0; }
  .info .aktionen.haupt { display: flex; }
  .rechtlich.im-kopf { display: none; }

  .sheet { animation: none; max-height: none; border-radius: var(--radius); box-shadow: var(--schatten); padding: 18px 16px 16px; }
  .sheet::before { display: none; }
  .explore, .explore:not(.offen) { display: grid; position: absolute; top: 20px; right: 20px; left: auto; bottom: auto; width: 300px; padding: 20px; gap: 14px; max-height: calc(100% - 40px); }
  .explore .gruppe:first-of-type { border-top: 0; padding-top: 0; }
  .explore .seg button { padding: 0 6px; font-size: 12.5px; min-height: 36px; }
  .room { left: 20px; right: auto; bottom: 20px; width: 300px; padding: 20px; animation: hoch 0.26s cubic-bezier(0.2, 0.8, 0.2, 1); }

  .dock { left: 50%; right: auto; bottom: calc(var(--fuss, 34px) + 12px); transform: translateX(-50%); display: flex; align-items: center; gap: 10px; }
  .dock .seg.stark button { padding: 0 18px; font-size: 13.5px; }
  .dock-extra { position: static; display: flex; }
  .kontext { left: 50%; right: auto; transform: translateX(-50%); display: flex; flex-direction: row-reverse; align-items: center; width: max-content; max-width: min(640px, 100vw - 680px); }
  .rechtlich.fuss { position: absolute; left: 340px; right: 340px; bottom: 5px; width: fit-content; max-width: 640px; margin: 0 auto; padding: 4px 12px; border-radius: 10px; background: rgba(244, 242, 237, 0.86); text-align: center; font-size: 11px; line-height: 1.35; z-index: 4; text-wrap: balance; }

  .panel.plan { inset: 20px 20px 20px auto; width: min(46vw, 760px); border-radius: var(--radius); padding: 20px; }
  .plan-offen.immersiv .explore { display: none; }
  /* Neben dem Plan bleibt nur Platz für die Ansichten und den Rechtshinweis. */
  .plan-offen .dock { left: 330px; transform: none; }
  .plan-offen .dock-extra, .plan-offen .kontext { display: none; }
  .plan-offen .rechtlich.fuss { right: calc(min(46vw, 760px) + 40px); margin: 0; }
  .immersiv .rechtlich.kurz { display: none; }
  .chip { min-height: 40px; }
  .overlay { align-items: center; justify-items: center; padding: 24px; }
  .dialog { width: min(860px, 100%); border-radius: var(--radius); padding: 24px; }
  .dialog.schmal { width: min(520px, 100%); }
}
@media (min-width: 900px) and (min-height: 620px) and (max-width: 1180px) {
  .immersiv .poster { inset: 28px 300px 112px; }
  .info, .explore, .explore:not(.offen), .room { width: 264px; }
  .kennzahl strong { font-size: 24px; }
  .dock { left: auto; right: 20px; transform: none; }
  .kontext { left: auto; right: 0; transform: none; max-width: 420px; }
  .explore, .explore:not(.offen) { max-height: calc(100% - 150px); }
  .rechtlich.fuss { left: 20px; right: 20px; }
  .explore #seg-szenario { display: grid; grid-template-columns: 1fr 1fr; border-radius: 22px; }
  .app:has(.room:not([hidden])) .rechtlich.fuss { left: 304px; }
  .plan-offen .dock { display: none; }
}
/* Niedriger Bildschirm: Wohnungskarte und Raumkarte passen nicht übereinander, die Detailwerte weichen. */
@media (min-width: 900px) and (min-height: 620px) and (max-height: 860px) {
  .app:has(.room:not([hidden])) .info .werte, .app:has(.room:not([hidden])) .info .quelle, .app:has(.room:not([hidden])) .info .highlight { display: none; }
}
/* Telefon quer: eine Zeile unten, Blätter kommen von rechts, damit dem Modell die Höhe bleibt. */
@media (orientation: landscape) and (max-height: 619px) {
  .immersiv .poster { inset: 16px 16px 76px 44%; }
  .info { right: auto; max-width: 52%; max-height: calc(100% - 84px); }
  .immersiv .rechtlich.kurz { right: auto; width: 46%; }
  .dock { display: flex; align-items: center; }
  .dock .seg { flex: 1 1 auto; }
  .dock-mobil .btn { flex: 0 0 auto; padding: 0 16px; }
  .dock-mobil .btn.icon { padding: 0; }
  .dock-extra { display: flex; }
  .kontext { right: 120px; }
  .sheet { left: auto; top: 0; width: min(360px, 50%); max-height: none; border-radius: 18px 0 0 18px; align-content: start; }
  .sheet::before { display: none; }
}

/* ---------- Wohnungsseite mit Vorschau ---------- */
.app:not(.immersiv) { display: flex; flex-direction: column; gap: 14px; max-width: 580px; margin: 0 auto; padding: 18px 16px calc(32px + var(--unten)); }
.app:not(.immersiv) .info, .app:not(.immersiv) .info-mehr, .app:not(.immersiv) .explore { display: contents; }
.app:not(.immersiv) .labels, .app:not(.immersiv) .dock, .app:not(.immersiv) .room, .app:not(.immersiv) .rechtlich.fuss, .app:not(.immersiv) .rechtlich.im-kopf,
.app:not(.immersiv) .info-knoepfe, .app:not(.immersiv) .meta.kurz, .app:not(.immersiv) .explore > :not(.links) { display: none !important; }
.app:not(.immersiv) .sheet::before { display: none; }
.app:not(.immersiv) .info-kopf { order: 1; }
.app:not(.immersiv) .info-kopf > div:first-child { display: block; }
.app:not(.immersiv) .zurueck { display: inline-flex; align-items: center; gap: 4px; min-height: 44px; margin: -8px 0 6px -6px; padding-right: 8px; color: var(--tinte-70); font-weight: 600; font-size: 13px; text-decoration: none; }
.app:not(.immersiv) .zurueck:hover { color: var(--gruen); }
.app:not(.immersiv) h1 { font-size: 40px; margin: 4px 0 4px; }
.app:not(.immersiv) .meta.lang { display: block; font-size: 14px; }
.app:not(.immersiv) .highlight { display: block; order: 2; }
.app:not(.immersiv) .highlight .titel { font-size: 21px; font-stretch: 112%; font-weight: 700; }
.app:not(.immersiv) .highlight .text { display: block; font-size: 14.5px; }
.app:not(.immersiv) .stage { order: 3; height: min(72svh, 125vw); border-radius: 18px; overflow: hidden; cursor: pointer; box-shadow: inset 0 0 0 1px rgba(22, 48, 31, 0.06); }
.app:not(.immersiv) .stage canvas { pointer-events: none; }
.app:not(.immersiv) .vorschau-leiste { order: 4; display: grid; justify-items: center; gap: 6px; margin: -76px 0 8px; position: relative; z-index: 2; pointer-events: none; min-height: 62px; align-content: start; }
.vorschau-leiste .btn { pointer-events: auto; flex: 0 0 auto; box-shadow: 0 6px 20px rgba(22, 48, 31, 0.22); padding: 0 22px; }
.bereit #lade-text { visibility: hidden; }
.app:not(.immersiv) .info > .kennzahl { order: 5; display: flex; }
.app:not(.immersiv) .kennzahl strong { font-size: 30px; }
.app:not(.immersiv) .werte { order: 6; }
.app:not(.immersiv) .info .aktionen.haupt { order: 7; display: flex; }
.app:not(.immersiv) .explore .links { order: 8; display: grid; border-top: 0; padding-top: 0; }
.app:not(.immersiv) .raeume { order: 9; display: block; }
.app:not(.immersiv) .info-mehr > .quelle { order: 10; }
.app:not(.immersiv) .rechtlich.seite { order: 11; display: block; font-size: 12.5px; line-height: 1.5; padding-top: 12px; border-top: 1px solid var(--linie); }
.raeume { border-top: 1px solid var(--linie); border-bottom: 1px solid var(--linie); }
.raeume summary { display: flex; align-items: center; justify-content: space-between; min-height: 48px; font-weight: 600; cursor: pointer; list-style: none; }
.raeume summary::-webkit-details-marker { display: none; }
.raeume summary::after { content: ""; width: 9px; height: 9px; margin-right: 6px; border-right: 2px solid var(--tinte-70); border-bottom: 2px solid var(--tinte-70); transform: rotate(45deg); transition: transform 0.18s; }
.raeume[open] summary::after { transform: rotate(-135deg); }
.raeume h4 { margin: 12px 0 0; }
.raeume ul { margin-bottom: 8px; }
.raeume .zeile { border-bottom: 0; border-top: 1px solid var(--linie); }
.raeume ul .zeile:first-child, .raeume li:first-child .zeile { border-top: 0; }
.raeume .quelle { padding: 0 0 12px; }
.ohne-3d .stage { cursor: default; }
.app.ohne-3d:not(.immersiv) .stage { height: min(60svh, 82vw); }

@media (min-width: 900px) {
  .app:not(.immersiv) { display: grid; grid-template-columns: minmax(300px, 380px) minmax(0, 1fr); column-gap: 56px; row-gap: 0; align-content: start; max-width: 1360px; padding: 40px 40px 56px; }
  .app:not(.immersiv) .info-kopf, .app:not(.immersiv) .highlight, .app:not(.immersiv) .info > .kennzahl, .app:not(.immersiv) .werte, .app:not(.immersiv) .info .aktionen.haupt,
  .app:not(.immersiv) .explore .links, .app:not(.immersiv) .raeume, .app:not(.immersiv) .info-mehr > .quelle, .app:not(.immersiv) .rechtlich.seite { grid-column: 1; margin-bottom: 16px; }
  .app:not(.immersiv) .stage { grid-column: 2; grid-row: 1 / span 12; position: sticky; top: 24px; align-self: start; height: calc(100vh - 48px); min-height: 420px; }
  .app:not(.immersiv) .vorschau-leiste { grid-column: 2; grid-row: 1 / span 12; position: sticky; top: calc(100vh - 110px); align-self: start; margin: 0; }
  .app.ohne-3d:not(.immersiv) .stage { height: calc(100vh - 48px); }
}
@media (pointer: coarse) { .icon-btn { width: 44px; height: 44px; } }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
