/* Vitrinen-Finder (/vitrinen-finder/) — Seite aus tools/build-wegweiser.mjs, Bedienung in /js/vitrinen-finder.js.
   Nutzt Schrift, Grün und Abstände aus shop.css. Eigene Farben nur für die gezeichnete Wohnraum-Szene. */

.vf-pult, .vf-karten, .vf-landkarte, .vf-baum {
  --vf-wand: #e4e8ec; --vf-diele: #c9a67b; --vf-holz: #7b5238; --vf-holz-hell: #94674a; --vf-holz-dunkel: #5c3c28;
  --vf-glas: #5f9bb3; --vf-stueck: #2f3a45; --vf-stueck-mittel: #74828f; --vf-stueck-hell: #d5dce2; --vf-blatt: #4f8f53;
}

/* Kopf bewusst flach: Kacheln, Szene und Regler sollen ohne Scrollen sichtbar sein */
.vf-hero { padding: 18px 0 0; }
.vf-hero h1 { text-wrap: balance; font-size: clamp(25px, 3vw, 33px); margin-bottom: 6px; }
.vf-hero .lede { margin-bottom: 6px; font-size: 16px; }
.vf-lead { max-width: 70ch; color: #2c3640; margin: 0 0 20px; }
.vf { padding: 6px 0 44px; }
.vf-ohne { color: var(--color-muted); }
.vf-symbole { position: absolute; }

/* Farben der gezeichneten Sammelstücke (Kacheln und Szene) */
.vi1 { fill: var(--vf-stueck, #2f3a45); }
.vi2 { fill: var(--vf-stueck-mittel, #74828f); }
.vi3 { fill: var(--color-accent, #d97706); }
.vi4 { fill: var(--vf-stueck-hell, #d5dce2); }
.vi5 { fill: var(--vf-blatt, #4f8f53); }

/* ---------- Frage 1: Kacheln mit Bild ---------- */
.vf-lab { font-weight: 700; font-size: 16px; margin: 0 0 6px; color: var(--color-text); }
.vf-nurvorlesen { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.vf-lab2 { font-weight: 700; font-size: 14px; margin: 0 0 6px; color: var(--color-text); }
.vf-kacheln { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 8px; margin-bottom: 12px; }
.vf-kachel { font: inherit; cursor: pointer; background: #fff; border: 1.5px solid var(--color-border); border-radius: 10px; padding: 6px 4px 7px;
  display: flex; flex-direction: column; align-items: center; gap: 2px; color: var(--color-text); min-width: 0;
  transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease; }
.vf-kachel svg { width: 100%; max-width: 66px; height: auto; aspect-ratio: 5 / 3; display: block; }
.vf-kachel span { font-size: 12.5px; line-height: 1.2; font-weight: 600; text-align: center; hyphens: auto; overflow-wrap: break-word; max-width: 100%; }
.vf-kachel:hover { border-color: var(--color-primary); transform: translateY(-2px); box-shadow: 0 6px 16px rgba(46, 125, 50, .14); }
.vf-kachel[aria-pressed="true"] { border-color: var(--color-primary); background: var(--color-primary-soft); box-shadow: inset 0 0 0 1.5px var(--color-primary); }
.vf-kachel:focus-visible, .vf-seg button:focus-visible, .vf-chips button:focus-visible, .vf-mini:focus-visible { outline: 2px solid var(--color-primary-dark); outline-offset: 2px; }

/* ---------- Bühne und Ergebnis ---------- */
.vf-mitte { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 4.4fr); gap: 26px; align-items: start; }
.vf-buehne, .vf-ergebnis { min-width: 0; }
.vf-rahmen { position: relative; border-radius: 14px; overflow: hidden; background: var(--vf-wand); border: 1px solid var(--color-border); }
.vf-szene { display: block; width: 100%; height: auto; aspect-ratio: 2 / 1; user-select: none; -webkit-user-select: none; }
.vf-szene.vf-zieht { cursor: ew-resize; }
.vf-schild { position: absolute; top: 12px; right: 12px; text-align: right; max-width: calc(100% - 24px); background: #fff; border-radius: 10px; padding: 8px 12px;
  box-shadow: 0 2px 10px rgba(30, 40, 50, .16); font-size: 13.5px; line-height: 1.3; pointer-events: none; }
.vf-schild strong { display: block; font-size: 16px; color: var(--color-primary-dark); }
.vf-schild span { color: var(--color-muted); font-variant-numeric: tabular-nums; }
.vf-schild b { color: var(--color-text); }
.vf-rechnet { font-weight: 400; }

.vf-schalter { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 16px; margin: 0 0 10px; position: relative; }
.vf-unterbuehne { display: grid; gap: 12px; margin-top: 12px; }
.vf-gruppe { min-width: 0; }
.vf-gruppe--breit { grid-column: 1 / -1; }
.vf-gruppe:empty { display: none; }
.vf-seg { display: flex; flex-wrap: wrap; gap: 6px; }
.vf-seg button { font: inherit; font-size: 14.5px; font-weight: 600; cursor: pointer; flex: 1 1 120px; padding: 9px 10px; line-height: 1.2;
  border: 1.5px solid var(--color-border); background: #fff; color: var(--color-text); border-radius: 8px; }
.vf-seg button:hover { border-color: var(--color-primary); }
.vf-seg button[aria-pressed="true"] { background: var(--color-primary); border-color: var(--color-primary); color: #fff; }
.vf-paar { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; }
.vf-auto { font-size: 14px; color: var(--color-muted); margin: 0; }
.vf-laenge { display: block; }
.vf-laenge output { font-variant-numeric: tabular-nums; }
#vfLen { width: 100%; margin: 4px 0 0; accent-color: var(--color-primary); }
.vf-marken { position: relative; height: 18px; font-size: 12px; color: var(--color-muted); }
.vf-marken span { position: absolute; transform: translateX(-50%); white-space: nowrap; }

.vf-beispiele { margin-top: 16px; }
.vf-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.vf-chips button { font: inherit; font-size: 13.5px; cursor: pointer; border: 1.5px dashed #b9c2cb; background: #fff; color: var(--color-text); padding: 7px 12px; border-radius: 999px; line-height: 1.2; }
.vf-chips button:hover { border-color: var(--color-primary); border-style: solid; }
.vf-chips button[aria-pressed="true"] { border-style: solid; border-color: var(--color-primary); background: var(--color-primary-soft); font-weight: 700; }
.vf-fuss { display: flex; flex-wrap: wrap; gap: 6px 22px; margin-top: 14px; }
.vf-mini { font: inherit; font-size: 13px; background: none; border: 0; padding: 0; color: var(--color-primary-dark); text-decoration: underline; cursor: pointer; }
.vf-mini[aria-pressed="true"] { font-weight: 700; }

.vf-ergebnis .vf-karte { border: 2px solid var(--color-primary); box-shadow: 0 10px 28px rgba(46, 125, 50, .12); }
.vf-passt { margin: 0 0 2px; font-size: 13.5px; color: var(--color-muted); }
.vf-ergebnis .vf-karte h3 { font-size: 24px; line-height: 1.15; }
.vf-wahl { display: inline-block; font-size: 12px; font-weight: 700; padding: 2px 9px; border-radius: 999px; background: var(--color-primary-soft);
  color: var(--color-primary-dark); margin-left: 8px; vertical-align: middle; white-space: nowrap; }
.vf-preis { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; margin: 14px 0 0; padding: 10px 14px; border-radius: 8px; background: var(--color-bg-soft); }
.vf-preis-zahl { font-size: 30px; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; color: var(--color-text); }
.vf-preis-text { font-size: 12.5px; color: var(--color-muted); flex: 1 1 180px; line-height: 1.35; }

.vf-unten { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 4.4fr); gap: 26px; margin-top: 22px; align-items: start; }
.vf-unten > div:empty { display: none; }
.vf-streifen-titel, .vf-kauf-titel { font-weight: 700; font-size: 14px; margin: 0 0 8px; }
.vf-streifen-bilder { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.vf-streifen-bilder a { display: block; }
.vf-streifen-bilder img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 8px; border: 1px solid var(--color-border); }
.vf-zeile { display: grid; grid-template-columns: minmax(0, 10em) minmax(0, 1fr) 3.2em; gap: 10px; align-items: center; font-size: 13.5px; margin: 4px 0; }
.vf-zeile .vf-balken { height: 8px; border-radius: 4px; background: var(--color-border); overflow: hidden; }
.vf-zeile .vf-balken span { display: block; height: 100%; background: var(--color-primary); }
.vf-zeile .vf-prozent { text-align: right; font-variant-numeric: tabular-nums; color: var(--color-muted); }
.vf-quelle { font-size: 12px; color: var(--color-muted); margin: 6px 0 0; }

/* ---------- Die gezeichnete Szene ---------- */
.vf-szene text { font-family: var(--font-sans); }
.vf-wand { fill: var(--vf-wand); }
.vf-licht { fill: #fff; opacity: .34; }
.vf-diele { fill: var(--vf-diele); }
.vf-leiste { fill: #f5f6f7; }
.vf-pflanze ellipse { fill: var(--vf-blatt); }
.vf-pflanze ellipse:nth-child(even) { fill: #3f7a45; }
.vf-topf { fill: #46505a; }
.vf-holz .k-front { fill: var(--vf-holz); }
.vf-holz .k-oben { fill: var(--vf-holz-hell); }
.vf-holz .k-seite { fill: var(--vf-holz-dunkel); }
.vf-fuss { fill: #33241b; }
.vf-fuge { stroke: var(--vf-holz-dunkel); stroke-width: 2; fill: none; }
.vf-knauf { fill: #dcc7a8; }
.vf-winkel { fill: #46505a; }

.vf-glas .k-front { fill: rgba(206, 232, 242, .24); stroke: var(--vf-glas); stroke-width: 2.4; }
.vf-glas .k-oben { fill: rgba(255, 255, 255, .5); stroke: var(--vf-glas); stroke-width: 2; stroke-linejoin: round; }
.vf-glas .k-seite { fill: rgba(176, 214, 228, .34); stroke: var(--vf-glas); stroke-width: 2; stroke-linejoin: round; }
.vf-glas .k-hinten { fill: none; stroke: var(--vf-glas); stroke-width: 1; opacity: .45; }
.vf-glas .k-glanz { fill: #fff; opacity: .5; }
.vf-glas--offen .k-front, .vf-glas--offen .k-oben, .vf-glas--offen .k-seite { stroke-dasharray: 7 6; }
.vf-glas--ohnedeckel .k-oben { fill: none; stroke-dasharray: 4 5; }
.vf-treppe .k-oben { fill: rgba(255, 255, 255, .62); }
.vf-deckel { fill: rgba(255, 255, 255, .66); stroke: var(--vf-glas); stroke-width: 2; stroke-linejoin: round; }
.vf-front rect { fill: rgba(255, 255, 255, .14); stroke: var(--vf-glas); stroke-width: 3; }
.vf-front path { fill: none; stroke: var(--vf-stueck); stroke-width: 2.4; }
.vf-rahmenmitte path { fill: none; stroke: var(--vf-glas); stroke-width: 4; }
.vf-rahmenmitte .vf-durchgang { stroke-width: 1.4; stroke-dasharray: 4 4; }
.vf-raster path { stroke: var(--vf-glas); stroke-width: 1.5; fill: none; }
.vf-ball { fill: #fff; stroke: var(--vf-stueck-mittel); stroke-width: 1.4; }
.vf-oese { stroke: var(--vf-stueck); stroke-width: 4; stroke-linecap: round; }
.vf-karte-blister { fill: var(--color-accent); }
.vf-blister { fill: rgba(255, 255, 255, .55); stroke: #fff; stroke-width: 1.5; }
.vf-schlitz { fill: var(--vf-stueck); }
.vf-muenze, .vf-muenzen circle { fill: #e2b23c; stroke: #b98a1e; stroke-width: 1.5; }

.vf-masslinie path { stroke: var(--color-primary-dark); stroke-width: 2; fill: none; }
.vf-masslinie rect { fill: #fff; stroke: var(--color-primary-dark); stroke-width: 1.5; }
.vf-masslinie text { font-size: 16px; font-weight: 700; fill: var(--color-primary-dark); font-variant-numeric: tabular-nums; }
.vf-massband rect { fill: rgba(47, 58, 69, .22); }
.vf-massband rect.an { fill: var(--color-primary); }
.vf-massband text { font-size: 15px; fill: rgba(47, 58, 69, .7); }
.vf-massband text.an { fill: var(--color-primary-dark); font-weight: 700; }
.vf-massband text.vf-cm { font-size: 13px; }
.vf-griff { cursor: ew-resize; touch-action: none; }
.vf-griff-knopf { fill: var(--color-primary); stroke: #fff; stroke-width: 3; }
.vf-griff path { fill: none; stroke: #fff; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; pointer-events: none; }
.vf-griff-ring { fill: var(--color-primary); opacity: 0; transform-box: fill-box; transform-origin: center; }
.vf-griff:hover .vf-griff-knopf { fill: var(--color-primary-dark); }
.vf-zieh rect { fill: var(--vf-stueck); }
.vf-zieh text { fill: #fff; font-size: 14px; font-weight: 600; }
.vf-zieh { pointer-events: none; }
.vf-blase rect { fill: #fff; stroke: var(--vf-stueck-mittel); stroke-width: 1.2; }
.vf-blase text { font-size: 15px; font-weight: 600; fill: var(--vf-stueck); }

/* Bewegung: nur als Antwort auf eine Bedienung (Klasse vf-neu setzt das Skript beim Wechsel der Lösung) */
@keyframes vfSenken { from { transform: translateY(-110px); opacity: 0; } 55% { opacity: 1; } to { transform: none; opacity: 1; } }
@keyframes vfHin { from { opacity: 0; } to { opacity: 1; } }
@keyframes vfDeckel { 0% { transform: none; } 30%, 68% { transform: translateY(-58px); } 100% { transform: none; } }
@keyframes vfFront { 0% { transform: translate(46px, -30px); opacity: .2; } 60% { transform: translate(0, -10px); opacity: 1; } 100% { transform: none; } }
@keyframes vfMuenze { 0% { opacity: 0; transform: none; } 20% { opacity: 1; transform: none; } 80% { opacity: 1; transform: translateY(40px); } 100% { opacity: 0; transform: translateY(48px); } }
@keyframes vfPuls { 0% { transform: scale(1); opacity: .55; } 100% { transform: scale(2.3); opacity: 0; } }
.vf-neu .vf-a-senken { animation: vfSenken .62s cubic-bezier(.2, .9, .25, 1) both; }
.vf-neu .vf-a-stueck { animation: vfHin .3s ease-out both; }
.vf-neu .vf-a-deckel { animation: vfDeckel 1.9s ease-in-out .25s both; }
.vf-neu .vf-a-front { animation: vfFront 1.1s cubic-bezier(.2, .9, .25, 1) .2s both; }
.vf-neu .vf-a-muenze { animation: vfMuenze 1.3s ease-in .5s both; }
.vf-a-muenze { opacity: 0; }
.vf-griff--neu .vf-griff-ring { animation: vfPuls 1.5s ease-out .8s 4; }
@media (prefers-reduced-motion: reduce) {
  .vf-neu .vf-a-senken, .vf-neu .vf-a-stueck, .vf-neu .vf-a-deckel, .vf-neu .vf-a-front, .vf-neu .vf-a-muenze, .vf-griff--neu .vf-griff-ring { animation: none; }
  .vf-kachel { transition: none; }
}

/* ---------- Ergebnis-Karten ---------- */
.vf-karten { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.vf-karte { border: 1px solid var(--color-border); border-radius: 10px; background: #fff; overflow: hidden; min-width: 0;
  scroll-margin-top: var(--header-h, 150px); display: flex; flex-direction: column; }
.vf-karte:target { border-color: var(--color-primary); box-shadow: 0 0 0 3px var(--color-primary-soft); }
.vf-karte-bild { display: block; width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; border-bottom: 1px solid var(--color-border); }
.vf-karte-text { padding: 18px 20px 20px; }
.vf-karte h3 { margin: 0 0 2px; font-size: 20px; color: var(--color-primary-dark); }
.vf-prod { margin: 0 0 10px; font-size: 13.5px; color: var(--color-muted); }
.vf-weil { margin: 0 0 10px; }
.vf-hinweis { margin: 0 0 4px; font-size: 14px; padding: 8px 12px; border-left: 3px solid var(--color-accent); background: #fff8eb; border-radius: 0 var(--radius) var(--radius) 0; }
.vf-knoepfe { display: flex; flex-wrap: wrap; gap: 10px; margin: 14px 0 12px; }
.vf-mehr { list-style: none; margin: 0 0 4px; padding: 0; font-size: 14.5px; }
.vf-mehr li { margin: 4px 0; }
.vf-ideen { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--color-border); font-size: 14.5px; }
.vf-ideen ul { list-style: none; margin: 6px 0 0; padding: 0; }
.vf-ideen li { margin: 6px 0; }
.vf-ideen a { display: block; padding: 8px 12px; border: 1px solid var(--color-border); border-radius: var(--radius); color: var(--color-text); background: var(--color-bg-soft); }
.vf-ideen a:hover { border-color: var(--color-primary); text-decoration: none; }
.vf-ideen a b { color: var(--color-primary-dark); margin-right: 4px; }

/* ---------- Landkarte ---------- */
.vf-tabelle { overflow-x: auto; }
.vf-landkarte { border-collapse: separate; border-spacing: 8px; width: 100%; min-width: 520px; table-layout: fixed; }
.vf-landkarte thead td { width: 7.5em; }
.vf-landkarte th { text-align: left; font-size: 15px; padding: 6px 8px; color: var(--color-text); vertical-align: top; }
.vf-landkarte tbody td { background: #fff; border: 1px solid var(--color-border); border-radius: 8px; padding: 14px 16px; vertical-align: top; }
.vf-landkarte td p { margin: 0 0 8px; font-size: 14.5px; }
.vf-landkarte td p.vf-ziele { margin: 0; font-weight: 600; line-height: 1.7; }
.vf-sonder { margin: 12px 8px 0; font-size: 14.5px; line-height: 1.7; }

/* ---------- Der ganze Weg ---------- */
.vf-baum { font-size: 15px; max-width: 78ch; }
.vf-baum ul { margin: 4px 0 10px; padding-left: 22px; }
.vf-baum li { margin: 4px 0; }
.vf-frage { font-weight: 700; margin: 12px 0 2px; }
.vf-frage span { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 5px; margin-right: 4px; border-radius: 11px;
  background: var(--color-dark); color: #fff; font-size: 12px; }

@media (max-width: 1020px) {
  .vf-kacheln { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .vf-mitte, .vf-unten { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .vf-karten { grid-template-columns: minmax(0, 1fr); }
  .vf-rahmen { margin-left: -12px; margin-right: -12px; border-radius: 10px; }
  .vf-szene text { font-size: 19px; }
  .vf-zieh { display: none; }
}
@media (max-width: 560px) {
  .vf-kacheln { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
  .vf-kachel span { font-size: 11.5px; }
  .vf-schild { top: 8px; right: 8px; padding: 6px 10px; font-size: 12.5px; }
  .vf-schild strong { font-size: 14.5px; }
  .vf-paar, .vf-streifen-bilder { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .vf-paar { grid-template-columns: minmax(0, 1fr); }
  .vf-seg button { flex-basis: 110px; }
  .vf-zeile { grid-template-columns: minmax(0, 8.5em) minmax(0, 1fr) 3em; }
}

.vf-dick { margin-top: 12px; }
