/* Bau-Montage (house-montage.js) */
.hm-overlay { position: fixed; inset: 0; z-index: 9700; display: flex; align-items: center; justify-content: center; padding: 14px; background: rgba(20, 12, 6, 0.72); transition: opacity 0.35s; }
.hm-overlay.out { opacity: 0; }
.hm-card { position: relative; width: min(100%, 520px); border: 3px solid var(--cs-ink, #2b1a0e); border-radius: 12px; background: #fffdf5; box-shadow: 5px 5px 0 var(--cs-ink, #2b1a0e); padding: 10px; color: var(--cs-ink, #2b1a0e); }
.hm-sky { position: absolute; left: 10px; right: 10px; top: 10px; height: 62%; background: linear-gradient(#9fd6f0, #d8f0fa); border-radius: 6px 6px 0 0; overflow: hidden; }
.hm-cloud { position: absolute; width: 46px; height: 14px; background: #fff; border-radius: 8px; box-shadow: 14px -6px 0 #fff; opacity: 0.9; animation: hm-drift 16s linear infinite; }
.hm-cloud.c1 { top: 18%; left: -10%; }
.hm-cloud.c2 { top: 40%; left: -40%; animation-duration: 22s; }
@keyframes hm-drift { to { transform: translateX(640px); } }
.hm-scene { position: relative; border-radius: 6px; overflow: hidden; }
.hm-house { display: block; width: 100%; height: auto; image-rendering: pixelated; }
.hm-plank { opacity: 0; transform: translateY(-14px); transition: opacity 0.2s, transform 0.28s cubic-bezier(.3, 1.6, .5, 1); }
.hm-plank.on { opacity: 1; transform: none; }
.hm-house g[opacity] { transition: opacity 0.3s; }
.hm-smoke circle { animation: hm-puff 1.6s ease-out infinite; transform-box: fill-box; }
.hm-smoke circle + circle { animation-delay: 0.5s; }
@keyframes hm-puff { from { transform: translateY(0) scale(0.7); opacity: 0.9; } to { transform: translateY(-14px) scale(1.5); opacity: 0; } }
.hm-worker { position: absolute; bottom: 4%; width: 17%; }
.hm-worker.me { left: 3%; }
.hm-worker.vet { right: 3%; }
.hm-av { width: 100%; }
.hm-hammer { position: absolute; top: 18%; font-size: 1.5rem; transform-origin: 80% 90%; animation: hm-hit 0.5s ease-in-out infinite; }
.hm-worker.me .hm-hammer { right: -45%; }
.hm-worker.vet .hm-hammer { left: -45%; animation-name: hm-hit2; animation-delay: 0.25s; }
@keyframes hm-hit { 0%, 100% { transform: rotate(-25deg); } 50% { transform: rotate(35deg); } }
@keyframes hm-hit2 { 0%, 100% { transform: scaleX(-1) rotate(-25deg); } 50% { transform: scaleX(-1) rotate(35deg); } }
.hm-worker.cheer .hm-av { animation: hm-hop 0.5s ease-in-out infinite; }
.hm-worker.cheer .hm-hammer { animation: none; }
@keyframes hm-hop { 50% { transform: translateY(-10px); } }
.hm-bubble { position: absolute; left: 50%; top: 5%; transform: translateX(-50%); padding: 4px 10px; background: #fff; border: 2px solid var(--cs-ink, #2b1a0e); border-radius: 10px; font: 800 0.85rem/1.2 inherit; white-space: nowrap; }
.hm-bar { height: 12px; margin-top: 8px; border: 2px solid var(--cs-ink, #2b1a0e); border-radius: 8px; background: #efe3c8; overflow: hidden; }
.hm-bar i { display: block; height: 100%; width: 0; background: linear-gradient(#f3c64e, #e0a21f); transition: width 0.4s; }
.hm-cap { margin: 6px 0 2px; text-align: center; font-weight: 800; font-size: 0.9rem; }
.hm-skip { position: absolute; right: 12px; top: 12px; z-index: 2; padding: 4px 9px; font: 700 0.72rem/1 inherit; border: 2px solid var(--cs-ink, #2b1a0e); border-radius: 8px; background: #fff8e6; cursor: pointer; opacity: 0.85; }
@media (prefers-reduced-motion: reduce) { .hm-cloud, .hm-hammer, .hm-smoke circle, .hm-worker.cheer .hm-av { animation: none; } .hm-plank { transition: none; } }
.hm-title { margin-top: 8px; text-align: center; font-weight: 900; font-size: 1rem; }
.hm-title + .hm-bar { margin-top: 6px; }
/* Reparatur-Montage eines Gebaeudes: Ruine wird von unten nach oben zum fertigen Gebaeude */
.hm-bscene { align-items: flex-end; display: flex; height: 280px; justify-content: center; overflow: visible; }
.hm-bscene::after { background: #5d8a3a; border-top: 3px solid #4a7230; bottom: 0; content: ""; height: 12%; left: 0; position: absolute; right: 0; z-index: 0; }
.hm-bsprite { height: 84%; margin-bottom: 7%; position: relative; z-index: 1; }
.hm-bsprite svg { height: 100%; image-rendering: pixelated; left: 0; position: absolute; top: 0; width: 100%; }
.hm-bsprite .hm-new { inset: 0; position: absolute; transition: clip-path 0.7s steps(7, end); }
.hm-bsprite .hm-old { inset: 0; position: absolute; }
.hm-old.shake { animation: hmShake 0.14s linear infinite; }
@keyframes hmShake { 0% { transform: translateX(0); } 25% { transform: translateX(-1.5px); } 75% { transform: translateX(1.5px); } 100% { transform: translateX(0); } }
@media (prefers-reduced-motion: reduce) { .hm-old.shake { animation: none; } .hm-bsprite .hm-new { transition: none; } }
