/* FRAME + FORM Projektseite, Ergänzungen 17.11.2026 (nur work-frame-form.html) */

/* 1. Skizze baut sich auf: Zeichenfläche liegt über den drei Bildern (die bleiben als Rückfall) */
.story.build .box .ffbuild { position: absolute; inset: 0; width: 100%; height: 100%; display: block; opacity: 0; transition: opacity .5s ease; z-index: 2; }
.story.build .box .ffbuild.ready { opacity: 1; }

/* 2. Grundriss-Regler: passt samt Text darüber auf einen Bildschirm */
.p-body .compare { justify-self: center; width: min(100%, calc((100svh - var(--nav-h) - 200px) * 2000 / 1342)); }
.p-body .compare .cmp { aspect-ratio: 2000 / 1342; }

/* 3. 360°-Rundgang allein und groß (19.11.: Reel steht jetzt darunter, eigene Möbel) */
.p-body .tour-row { grid-column: 3 / -1; display: flex; gap: clamp(20px, 2.6vw, 40px); align-items: flex-start; container-type: inline-size; }
.tour-row > figure { --h: min(70svh, 680px, calc(100cqw / 1.6)); margin: 0; }
.tour-row .tour .media { height: var(--h); aspect-ratio: 16 / 10; position: relative; isolation: isolate; background: #d6d6d2; border-radius: 4px; overflow: hidden; }

/* Reel unter dem Rundgang: Text links, Hochformat rechts */
.p-body .reel-row { grid-column: 3 / -1; display: flex; gap: clamp(24px, 4vw, 64px); align-items: center; }
.reel-row > .v { flex: 1 1 0; min-width: 0; max-width: 34em; }
.reel-row .reel { flex: none; margin: 0; }
.reel-row .reel .media { height: min(72svh, 640px); aspect-ratio: 9 / 16; border-radius: 14px; overflow: hidden; background: #000; }
.reel-row .reel video { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Innenbild passt ganz auf einen Bildschirm */
.p-body .fitvh { justify-self: center; width: min(100%, calc((100svh - var(--nav-h) - 110px) * 1.5)); }

.pano canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; cursor: grab; touch-action: pan-y; outline: none; }
.pano.grab canvas { cursor: grabbing; }
.pano canvas:focus-visible { box-shadow: inset 0 0 0 2px var(--ink); }
.pano .pano-ui { z-index: 3; position: absolute; left: 12px; right: 12px; bottom: 12px; display: flex; justify-content: space-between; align-items: flex-end; gap: 10px; pointer-events: none; }
.pano .rooms { display: flex; flex-wrap: wrap; gap: 6px; }
.pano button { pointer-events: auto; font-family: var(--mono); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; padding: 6px 10px; border-radius: 999px; background: rgba(246,246,243,.94); color: var(--ink); transition: background .2s ease, color .2s ease; }
.pano button[aria-pressed="true"] { background: var(--ink); color: #f4f4f1; }
.pano button:hover:not([aria-pressed="true"]):not(:disabled) { background: #fff; }
.pano button:disabled { opacity: .45; cursor: default; }
.pano .pano-hint { position: absolute; top: 12px; left: 50%; transform: translateX(-50%); padding: 5px 10px; border-radius: 999px; background: rgba(246,246,243,.94); z-index: 2; color: var(--ink); pointer-events: none; transition: opacity .6s ease; white-space: nowrap; }
.pano.used .pano-hint { opacity: 0; }
.pano .pano-load { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; opacity: 0; transition: opacity .3s ease; color: var(--ink-2); }
.pano.loading .pano-load { opacity: 1; }
.tour.no-gl .pano { background: url(ff/pano/wohnen.webp) 56% 50% / 300% auto no-repeat; }
.tour.no-gl .pano-ui, .tour.no-gl .pano-hint { display: none; }

@media (max-width: 820px) {
  .p-body .tour-row { flex-direction: column; align-items: center; }
  .tour-row > figure { width: 100%; }
  .tour-row .tour .media { height: auto; width: 100%; aspect-ratio: 4 / 3.4; }
  .p-body .reel-row { flex-direction: column; align-items: stretch; }
  .reel-row .reel { width: min(62vw, 300px); align-self: center; }
  .reel-row .reel .media { height: auto; width: 100%; }
  .pano .pano-ui { flex-direction: column; align-items: flex-start; }
  .p-body .fitvh { width: 100%; }
}

/* 4. Wissensbasis hell, scharf, mit wenig Rot */
.brainfig .media.brain { position: relative; isolation: isolate; aspect-ratio: 16 / 8.5; background: var(--paper); border: 1px solid var(--line); }
.brainfig canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; cursor: grab; touch-action: pan-y; outline: none; -webkit-user-select: none; user-select: none; -webkit-tap-highlight-color: transparent; }
.brainfig .media.grabbing canvas { cursor: grabbing; }
.brainfig canvas:focus-visible { box-shadow: inset 0 0 0 2px var(--ink); }
.brainfig canvas.brain-dust { pointer-events: none; cursor: default; }   /* 19.11. abends: Staub auf eigener WebGL-Fläche darunter (flüssiges Ziehen) */
@media (max-width: 820px) { .brainfig .media.brain { aspect-ratio: 4 / 3.6; } }

/* 5. Videos im Vollbild: ganzes Bild zeigen, nicht beschneiden */
video:fullscreen { object-fit: contain !important; width: 100% !important; height: 100% !important; background: #000; border-radius: 0 !important; }
video:-webkit-full-screen { object-fit: contain !important; width: 100% !important; height: 100% !important; background: #000; border-radius: 0 !important; }

/* 6. Kauf-Punkte im Rundgang (19.11. abends, Marlon: Punkte zu dominant, Klick unzuverlässig, Karte zu groß):
   erst nach „Shop the furniture“ sichtbar, grau und halb durchsichtig, Karte nur per Klick, klein */
.pano .acts { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; flex: none; }
.pano .acts .shop { min-width: calc(11.9em + 20px); }      /* Breite fest, damit „Hide prices“ nichts verschiebt */
.pano .pano-dots { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }   /* kein eigener Stapel: Punkte unter, offene Karte über den Knöpfen */
.pano .buy { position: absolute; left: 0; top: 0; width: 0; height: 0; will-change: transform; z-index: 1; }
.pano .buy.open { z-index: 4; }
.pano .buy .dot { pointer-events: auto; position: absolute; left: -15px; top: -15px; width: 30px; height: 30px; padding: 0; border-radius: 50%; background: transparent; cursor: pointer; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.pano .buy .dot::before { content: ""; position: absolute; inset: 9px; border-radius: 50%; background: radial-gradient(circle at 50% 45%, rgba(255,255,255,.95) 0 35%, rgba(222,222,217,.82) 75%); box-shadow: 0 0 0 1px rgba(0,0,0,.24), 0 1px 4px rgba(0,0,0,.28); transition: transform .18s ease, background .18s ease; }
.pano .buy .dot::after { content: ""; position: absolute; inset: 7px; border-radius: 50%; border: 1px solid rgba(255,255,255,.4); opacity: .6; }
@media (prefers-reduced-motion: no-preference) { .pano .buy .dot::after { animation: dot-puls 3.6s ease-in-out infinite; } }
@keyframes dot-puls { 0%, 100% { transform: scale(.9); opacity: .15; } 50% { transform: scale(1.15); opacity: .6; } }
.pano .buy .dot:hover::before { transform: scale(1.3); background: rgba(246,246,243,.85); }
.pano .buy.open .dot::before { transform: scale(1.3); background: rgba(255,255,255,.95); }
.pano .buy .dot:focus-visible { outline: 2px solid #fff; outline-offset: -4px; }
.pano .buy .card { position: absolute; left: 13px; top: -15px; display: none; pointer-events: auto; color: var(--ink); text-decoration: none; }
.pano .buy.l .card { left: auto; right: 13px; }
.pano .buy.u .card { top: auto; bottom: -15px; }
.pano .buy.open .card { display: block; }
.pano .buy .ci { display: grid; gap: 1px; width: max-content; max-width: 176px; padding: 7px 9px 8px; border-radius: 8px; background: rgba(246,246,243,.97); box-shadow: 0 4px 14px rgba(0,0,0,.16); font-family: var(--mono); font-size: 10px; line-height: 1.35; }
.pano .buy .ci small { color: var(--ink-2); font-size: 9.5px; letter-spacing: .03em; }
.pano .buy .ci b { font-family: var(--sans, inherit); font-size: 12px; font-weight: 600; letter-spacing: 0; line-height: 1.25; }
.pano .buy .ci em { font-style: normal; font-size: 11px; margin-top: 3px; }
.pano .buy .ci u { text-decoration: none; border-bottom: 1px solid currentColor; justify-self: start; margin-top: 1px; }
.pano .buy .card:hover u { color: #000; }
.tour.no-gl .pano-dots { display: none; }
.pano .buy button.dot, .pano .buy button.dot:hover:not(:disabled) { background: transparent; color: inherit; }
@media (max-width: 820px) {
  .pano .pano-hint { white-space: normal; text-align: center; width: max-content; max-width: calc(100% - 24px); }
  .pano .acts { justify-content: flex-start; }
}

/* 19.11. nachts: Punkte etwas besser sichtbar (12 px, heller Kern, dunklerer Rand), damit sie auch auf hellem Bettzeug auffallen */
