/* Haus-Check im neuen Stil – Logik und Klassen wie im Original (asbest-im-haus-interaktiv.html) */

.haus-app .explorer { display: grid; grid-template-columns: minmax(0, 3fr) minmax(300px, 1fr); gap: clamp(20px, 3vw, 36px); align-items: start; }

/* Hausbild */
.haus-app .house-card { border: 1px solid var(--line-strong); border-radius: var(--radius); padding: 10px; background: var(--paper); }
.haus-app .house-scroll { overflow: auto; border-radius: 14px; overscroll-behavior-x: contain; }
.haus-app .house-stage { position: relative; border-radius: 14px; overflow: hidden; background: var(--mist); }
.haus-app .house-stage > img { display: block; width: 100%; height: auto;  }
.haus-app .house-scroll.is-zoomed .house-stage { min-width: 1100px; }
.haus-app .house-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 6px 4px; }
.haus-app .house-toolbar span { font-size: 12px; color: var(--ink-3); }
.haus-app .house-zoom {
  padding: 9px 16px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--paper);
  font: 500 13px var(--font); color: var(--ink); cursor: pointer;
}
.haus-app .house-zoom:hover { border-color: var(--ink); }

/* Nummern auf dem Bild: Farben wie im Original (Asbest rot, PCB lila, PAK dunkel, KMF blau) */
.haus-app .hotspot {
  position: absolute; width: clamp(26px, 2.7vw, 40px); aspect-ratio: 1; transform: translate(-50%, -50%);
  display: grid; place-items: center; padding: 0; border-radius: 50%; cursor: pointer;
  color: #fff; background: linear-gradient(145deg, #e64942, #b82027); border: 1.5px solid rgba(255, 255, 255, 0.95);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.5), 0 3px 9px rgba(57, 17, 16, 0.33);
  font: 700 clamp(11px, 1.1vw, 15px)/1 var(--font); transition: transform 0.2s var(--ease), box-shadow 0.2s;
}
.haus-app .house-stage .hotspot.hotspot-pcb { background: linear-gradient(145deg, #9b5cf6, #6d28d9); }
.haus-app .house-stage .hotspot.hotspot-pak { background: linear-gradient(145deg, #4b5563, #111827); }
.haus-app .house-stage .hotspot.hotspot-kmf { background: linear-gradient(145deg, #0ea5e9, #075985); }
.haus-app .hotspot:hover, .haus-app .hotspot:focus-visible, .haus-app .hotspot[aria-pressed="true"] {
  z-index: 2; transform: translate(-50%, -50%) scale(1.13); outline: none;
  box-shadow: 0 0 0 4px #fff, 0 0 0 6px var(--ink), 0 5px 15px rgba(18, 42, 37, 0.33);
}
@media (max-width: 640px) { .haus-app .hotspot { width: 24px; font-size: 10px; } }

/* Detailkarte: Milchglas */
.haus-app .detail-card {
  position: sticky; top: 110px; padding: clamp(20px, 2.5vw, 28px); display: flex; flex-direction: column; gap: 14px;
  background: var(--glass); -webkit-backdrop-filter: blur(18px) saturate(140%); backdrop-filter: blur(18px) saturate(140%);
  border: 1px solid var(--rim); border-radius: var(--radius); box-shadow: var(--shadow);
}
.haus-app .counter { font-size: var(--step--1); color: var(--ink-3); }
.haus-app .number { display: none; }
.haus-app .detail-card h2 { font-size: var(--step-2); line-height: 1.15; }
.haus-app .example-figure { margin: 0; }
.haus-app .example-open {
  position: relative; display: block; width: 100%; padding: 0; border: 1px solid var(--line-strong); border-radius: 14px;
  overflow: hidden; background: var(--mist); cursor: zoom-in;
}
.haus-app .example-open img { display: block; width: 100%; height: clamp(160px, 16vw, 220px); object-fit: cover;  }
.haus-app .example-open span {
  position: absolute; left: 10px; bottom: 10px; padding: 6px 11px; border-radius: 999px; font-size: 11px; color: var(--ink);
  background: rgba(255, 255, 255, 0.8); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); border: 1px solid rgba(255, 255, 255, 0.9);
}
.haus-app .example-figure figcaption { margin-top: 8px; font-size: 11px; color: var(--ink-3); }
.haus-app #description { color: var(--ink-2); }
.haus-app .material { margin: 0 !important; padding: 12px 0 0; border-top: 1px solid var(--line); display: grid; gap: 2px; }
.haus-app .material strong { font-size: 12px; font-weight: 500; color: var(--ink-3); }
.haus-app .material span { color: var(--ink); }
.haus-app .point-link { margin: 0; }
.haus-app .point-link-btn { color: var(--ink); font-weight: 500; }
.haus-app .safety { font-size: var(--step--1); color: var(--ink-2); padding-top: 12px; border-top: 1px solid var(--line); }
.haus-app .safety strong { color: var(--ink); }
.haus-app .controls { display: flex; gap: 8px; }
.haus-app .controls button {
  flex: 1; min-height: 44px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--paper);
  font: 500 var(--step--1) var(--font); color: var(--ink); cursor: pointer;
}
.haus-app .controls #next { background: var(--ink); border-color: var(--ink); color: var(--paper); }

/* Legende */
.haus-app .substance-key { display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 28px 0 0; font-size: var(--step--1); color: var(--ink-2); }
.haus-app .substance-key span::before { content: ""; display: inline-block; width: 12px; height: 12px; border-radius: 50%; margin-right: 7px; vertical-align: -1px; background: #c42a2a; }
.haus-app .substance-key span:nth-child(2)::before { background: #7c3aed; }
.haus-app .substance-key span:nth-child(3)::before { background: #1f2937; }
.haus-app .substance-key span:nth-child(4)::before { background: #0369a1; }
.haus-app .house-note, .haus-app .sources { font-size: var(--step--1); color: var(--ink-3); max-width: 90ch; margin: 14px 0; }
.haus-app .sources a { color: var(--ink-2); }
.haus-app .legend { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 0 20px; margin: 20px 0; border-top: 1px solid var(--ink); }
.haus-app .legend button {
  display: flex; gap: 10px; align-items: baseline; text-align: left; padding: 12px 0; background: none; border: 0;
  border-bottom: 1px solid var(--line); font: inherit; font-size: var(--step--1); color: var(--ink-2); cursor: pointer;
}
.haus-app .legend button strong { color: #c42a2a; font-weight: 500; min-width: 20px; font-variant-numeric: tabular-nums; }
.haus-app .legend button:hover { color: var(--ink); }
.haus-app .legend button[aria-current="true"] { color: var(--ink); font-weight: 600; }

/* Bild groß */
.image-dialog { border: 1px solid var(--line-strong); border-radius: var(--radius); padding: 18px; max-width: min(960px, 94vw); background: var(--paper); color: var(--ink); }
.image-dialog::backdrop { background: rgba(255, 255, 255, 0.7); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.image-dialog .dialog-top { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 12px; }
.image-dialog h2 { font-size: var(--step-1); }
.image-dialog button { border: 1px solid var(--line-strong); border-radius: 999px; padding: 8px 14px; background: var(--paper); font: 500 13px var(--font); color: var(--ink); cursor: pointer; }
.image-dialog img { display: block; width: 100%; height: auto; border-radius: 12px;  }
.image-dialog p { font-size: var(--step--1); color: var(--ink-3); margin-top: 10px; }

@media (max-width: 950px) {
  .haus-app .explorer { grid-template-columns: 1fr; }
  .haus-app .detail-card { position: relative; top: 0; }
}
.haus-app [hidden] { display: none !important; }

.haus-app .legend button.legend-pcb strong { color: #7c3aed; }
.haus-app .legend button.legend-pak strong { color: #1f2937; }
.haus-app .legend button.legend-kmf strong { color: #0369a1; }

/* Glow-Punkte statt Nummernkreise: weißer Kern, eisblauer Schein, ruhiges Pulsieren */
.haus-app .house-stage .hotspot,
.haus-app .house-stage .hotspot.hotspot-pcb,
.haus-app .house-stage .hotspot.hotspot-pak,
.haus-app .house-stage .hotspot.hotspot-kmf {
  --glow: 64, 156, 255;
  width: 34px; aspect-ratio: 1; background: transparent; border: 0; box-shadow: none;
  color: transparent; font-size: 0; overflow: visible;
  transition: transform 0.35s var(--ease);
}
.haus-app .house-stage .hotspot::before {
  content: ""; position: absolute; left: 50%; top: 50%; width: 11px; height: 11px; border-radius: 50%;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, #fff 0 38%, rgb(var(--glow)) 100%);
  box-shadow: 0 0 0 1.5px rgba(255,255,255,.85), 0 0 8px 2px rgba(var(--glow), .9), 0 0 22px 6px rgba(var(--glow), .45);
  transition: width .3s var(--ease), height .3s var(--ease), box-shadow .3s;
}
.haus-app .house-stage .hotspot::after {
  content: ""; position: absolute; left: 50%; top: 50%; width: 11px; height: 11px; border-radius: 50%;
  transform: translate(-50%, -50%); border: 1.5px solid rgba(var(--glow), .8);
  animation: glow-ring 3.2s cubic-bezier(.2,.6,.3,1) var(--d, 0s) infinite;
}
@keyframes glow-ring {
  0% { width: 11px; height: 11px; opacity: .9; }
  70%, 100% { width: 38px; height: 38px; opacity: 0; }
}
.haus-app .house-stage .hotspot:hover,
.haus-app .house-stage .hotspot:focus-visible,
.haus-app .house-stage .hotspot[aria-pressed="true"] {
  z-index: 3; transform: translate(-50%, -50%); box-shadow: none; outline: none;
}
.haus-app .house-stage .hotspot:hover::before,
.haus-app .house-stage .hotspot:focus-visible::before,
.haus-app .house-stage .hotspot[aria-pressed="true"]::before {
  width: 16px; height: 16px;
  box-shadow: 0 0 0 2px #fff, 0 0 12px 4px rgba(var(--glow), 1), 0 0 34px 12px rgba(var(--glow), .55);
}
.haus-app .house-stage .hotspot[aria-pressed="true"]::after { animation-duration: 1.8s; }

/* Name als Milchglas-Schild */
.haus-app .house-stage .hs-tip {
  position: absolute; left: 50%; bottom: calc(100% + 2px); transform: translate(-50%, 6px);
  padding: 6px 11px; border-radius: 999px; white-space: nowrap; pointer-events: none;
  font: 500 12px/1.2 var(--font); color: var(--ink); letter-spacing: 0;
  background: rgba(255,255,255,.78); -webkit-backdrop-filter: blur(12px) saturate(150%); backdrop-filter: blur(12px) saturate(150%);
  border: 1px solid rgba(255,255,255,.9); box-shadow: 0 6px 20px rgba(10,30,60,.18);
  opacity: 0; transition: opacity .25s var(--ease), transform .3s var(--ease);
}
.haus-app .house-stage .hs-tip b { font-weight: 600; color: rgb(30, 110, 220); margin-right: 5px; font-variant-numeric: tabular-nums; }
.haus-app .house-stage .hotspot.tip-left .hs-tip { left: auto; right: 50%; transform: translate(14px, 6px); }
.haus-app .house-stage .hotspot.tip-right .hs-tip { left: 50%; transform: translate(-14px, 6px); }
.haus-app .house-stage .hotspot.tip-below .hs-tip { bottom: auto; top: calc(100% + 2px); }
.haus-app .house-stage .hotspot:hover .hs-tip,
.haus-app .house-stage .hotspot:focus-visible .hs-tip,
.haus-app .house-stage .hotspot[aria-pressed="true"] .hs-tip { opacity: 1; transform: translate(-50%, 0); }
.haus-app .house-stage .hotspot.tip-left:hover .hs-tip,
.haus-app .house-stage .hotspot.tip-left:focus-visible .hs-tip,
.haus-app .house-stage .hotspot.tip-left[aria-pressed="true"] .hs-tip { transform: translate(14px, 0); }
.haus-app .house-stage .hotspot.tip-right:hover .hs-tip,
.haus-app .house-stage .hotspot.tip-right:focus-visible .hs-tip,
.haus-app .house-stage .hotspot.tip-right[aria-pressed="true"] .hs-tip { transform: translate(-14px, 0); }
.haus-app .legend button strong,
.haus-app .legend button.legend-pcb strong,
.haus-app .legend button.legend-pak strong,
.haus-app .legend button.legend-kmf strong { color: rgb(30, 110, 220); }
@media (max-width: 640px) {
  .haus-app .house-stage .hotspot { width: 26px; }
  .haus-app .house-stage .hotspot::before { width: 9px; height: 9px; }
  .haus-app .house-stage .hs-tip { font-size: 11px; padding: 5px 9px; }
}
@media (prefers-reduced-motion: reduce) { .haus-app .house-stage .hotspot::after { animation: none; opacity: 0; } }

/* Glow-Farben je Stoff: Asbest eisblau, PCB violett, PAK bernstein, KMF mint */
.haus-app .house-stage .hotspot.hotspot-pcb { --glow: 168, 107, 255; }
.haus-app .house-stage .hotspot.hotspot-pak { --glow: 255, 160, 40; }
.haus-app .house-stage .hotspot.hotspot-kmf { --glow: 30, 206, 160; }
.haus-app .house-stage .hotspot.hotspot-pcb .hs-tip b { color: rgb(124, 58, 237); }
.haus-app .house-stage .hotspot.hotspot-pak .hs-tip b { color: rgb(196, 110, 0); }
.haus-app .house-stage .hotspot.hotspot-kmf .hs-tip b { color: rgb(4, 140, 106); }
.haus-app .legend button.legend-pcb strong { color: rgb(124, 58, 237); }
.haus-app .legend button.legend-pak strong { color: rgb(196, 110, 0); }
.haus-app .legend button.legend-kmf strong { color: rgb(4, 140, 106); }
.haus-app .glow-key { display: inline-flex; flex-wrap: wrap; gap: 4px 14px; align-items: center; }
.haus-app .glow-key i {
  display: inline-block; width: 8px; height: 8px; margin-right: 6px; border-radius: 50%; vertical-align: 1px;
  background: radial-gradient(circle, #fff 0 30%, rgb(var(--glow)) 100%); box-shadow: 0 0 6px 1px rgba(var(--glow), .8);
}
