/* Dein Möbelschreiner – Planer mit 3D-Bühne: Bühne links klebend, Optionen rechts; Handy: Bühne oben klebend */
.velkr-planer-raster { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: clamp(20px, 3vw, 36px); align-items: start; }
.velkr-buehne-spalte { position: sticky; top: 90px; z-index: 4; }
.velkr-planer-optionen { min-width: 0; }
.velkr-buehne { position: relative; border-radius: var(--velkr-r2); overflow: hidden; background: radial-gradient(120% 90% at 50% 35%, #faf6f0 0%, #ece4d8 100%); border: 1px solid var(--velkr-linie); }
.velkr-buehne-leinwand { position: relative; width: 100%; height: min(calc(100vh - 210px), 600px); min-height: 300px; touch-action: none; }
.velkr-buehne--aus .velkr-buehne-leinwand { display: none; }
.velkr-buehne--aus { min-height: 0; }
.velkr-buehne:not(.velkr-buehne--an):not(.velkr-buehne--aus) .velkr-buehne-leinwand::after { content: "3D-Vorschau lädt …"; position: absolute; inset: 0; display: grid; place-items: center; color: var(--velkr-stein); font-size: .9rem; }
.velkr-buehne-leinwand canvas { display: block; width: 100% !important; height: 100% !important; cursor: grab; }
.velkr-buehne-leinwand canvas:active { cursor: grabbing; }
.velkr-buehne-zahlen { position: absolute !important; inset: 0; pointer-events: none; z-index: 1; }
.velkr-masszahl { background: rgba(255, 253, 249, .92); border: 1px solid #e0c9a6; color: #6d4515; font: 600 .74rem/1 var(--velkr-sans); padding: 4px 7px; border-radius: 999px; white-space: nowrap; }
.velkr-buehne-leiste { position: absolute; left: 10px; right: 10px; bottom: 10px; z-index: 2; display: flex; gap: 8px; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; pointer-events: none; }
.velkr-buehne-leiste > * { pointer-events: auto; }
.velkr-buehne-preis { background: rgba(28, 25, 21, .86); color: #fff; padding: 8px 14px; border-radius: var(--velkr-r2); line-height: 1.1; }
.velkr-buehne-preis small { display: block; font-size: .7rem; letter-spacing: .08em; text-transform: uppercase; color: #e8b47a; }
.velkr-buehne-preis output { font: 500 1.35rem/1.15 var(--velkr-serif); white-space: nowrap; }
.velkr-buehne-tasten { display: flex; gap: 6px; flex-wrap: wrap; }
.velkr-buehne-taste { min-height: 40px; padding: 8px 12px; border-radius: 999px; border: 1px solid var(--velkr-linie); background: rgba(255, 253, 249, .94); font: 600 .82rem/1 var(--velkr-sans); color: var(--velkr-tinte); cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.velkr-buehne-taste:hover { border-color: var(--velkr-akzent); }
.velkr-buehne-taste input { accent-color: var(--velkr-akzent); width: 16px; height: 16px; margin: 0; }
.velkr-buehne-taste[hidden], .velkr-teilen [hidden] { display: none; }
.velkr-buehne-tipp { position: absolute; top: 10px; left: 12px; z-index: 2; font-size: .78rem; color: var(--velkr-stein); background: rgba(255, 253, 249, .8); padding: 3px 9px; border-radius: 999px; pointer-events: none; }
.velkr-teilen { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 12px 0 0; }
.velkr-teilen .velkr-buehne-taste { background: #fff; }
.velkr-planer-optionen .velkr-teilen { display: none; }

/* Baukasten-Chips */
.velkr-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.velkr-chip { position: relative; }
.velkr-chip[hidden] { display: none; }
.velkr-chip input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.velkr-chip span { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 8px 14px; border: 1px solid var(--velkr-linie); border-radius: 999px; font-size: .9rem; font-weight: 600; background: #fff; transition: border-color var(--velkr-dauer), background var(--velkr-dauer); }
.velkr-chip small { font-weight: 400; color: var(--velkr-stein); font-size: .78rem; }
.velkr-chip span::before { content: ""; width: 14px; height: 14px; border-radius: 50%; border: 1.5px solid #c9b79e; flex: none; transition: background var(--velkr-dauer), border-color var(--velkr-dauer); }
.velkr-chip input:checked + span { border-color: var(--velkr-akzent); background: #fbf1e6; }
.velkr-chip input:checked + span::before { background: var(--velkr-akzent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 6.2l2.3 2.3 4.7-5' fill='none' stroke='%23fff' stroke-width='1.8'/%3E%3C/svg%3E") center / 10px no-repeat; border-color: var(--velkr-akzent); }
.velkr-chip input:focus-visible + span { outline: 2px solid var(--velkr-akzent); outline-offset: 2px; }
.velkr-baukasten-tipp { display: block; margin-top: 8px; color: var(--velkr-stein); font-size: .82rem; }

/* Geführte Schritte (nur mit JS) mit fester Leiste unten */
.velkr-fortschritt { display: none; }
.velkr-schrittweise .velkr-fortschritt { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; list-style: none; padding: 0; margin: 0 0 18px; scroll-margin-top: 100px; }
.velkr-fortschritt li { margin: 0; }
.velkr-fortschritt button { width: 100%; min-height: 44px; background: none; border: 0; border-top: 3px solid var(--velkr-linie); padding: 8px 2px 0; font: 600 .78rem/1.2 var(--velkr-sans); color: var(--velkr-stein); text-align: left; cursor: pointer; }
.velkr-fortschritt button[aria-current="step"] { border-top-color: var(--velkr-akzent); color: var(--velkr-tinte); }
.velkr-fortschritt button.velkr-erledigt { border-top-color: #c79a63; }
.velkr-schrittweise [data-schritt] { display: none; }
.velkr-schrittweise [data-schritt].velkr-aktiv { display: block; animation: velkr-rein .3s ease-out; }
@keyframes velkr-rein { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.velkr-schrittleiste { display: none; }
.velkr-schrittweise .velkr-schrittleiste { display: flex; position: sticky; bottom: 0; z-index: 3; gap: 10px; align-items: center; margin: 18px -4px 0; padding: 10px 4px calc(10px + env(safe-area-inset-bottom)); background: rgba(255, 253, 249, .97); border-top: 1px solid var(--velkr-linie); box-shadow: 0 -10px 18px -14px rgba(28, 25, 21, .35); }
.velkr-schrittleiste .velkr-knopf { width: auto !important; margin: 0 !important; min-width: 0; }
.velkr-schrittleiste [data-velkr-weiter], .velkr-schrittleiste [data-velkr-absenden] { flex: 1.3; }
.velkr-schrittleiste [data-velkr-zurueck] { flex: .8; }
.velkr-schrittleiste-preis { flex: 1; text-align: center; line-height: 1.1; }
.velkr-schrittleiste-preis small { display: block; font-size: .68rem; letter-spacing: .08em; text-transform: uppercase; color: var(--velkr-stein); }
.velkr-schrittleiste-preis output { font: 500 1.05rem/1.2 var(--velkr-serif); white-space: nowrap; }
.velkr-schrittleiste [hidden] { display: none; }
.velkr-planer--voll .velkr-typen { grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); }
body:has(.velkr-planer--voll) .velkr-unten { display: none; }

/* Handy und schmale Tablets: Bühne oben klebend (ca. 38 % der Höhe), Optionen darunter */
@media (max-width: 860px) {
  .velkr-planer-raster { grid-template-columns: 1fr; gap: 14px; }
  .velkr-buehne-spalte { top: 72px; margin: 0 -1px; }
  .velkr-buehne-leinwand { height: 38vh; min-height: 220px; }
  .velkr-buehne-spalte .velkr-teilen { display: none; }
  .velkr-planer-optionen .velkr-teilen { display: flex; }
  .velkr-buehne-tipp { display: none; }
  .velkr-buehne-preis { padding: 6px 10px; }
  .velkr-buehne-preis output { font-size: 1.05rem; }
  .velkr-buehne-taste { min-height: 36px; padding: 6px 10px; font-size: .76rem; }
  .velkr-schrittweise .velkr-fortschritt { scroll-margin-top: calc(72px + 38vh + 20px); }
  .velkr-fortschritt button span { display: none; }
}

/* KI-Kästen */
.velkr-ki { border: 1px dashed #d6b48a; background: #fdf7ef; border-radius: var(--velkr-r2); padding: 14px 16px; margin: 0 0 18px; }
.velkr-ki-kopf { display: flex; gap: 10px; align-items: center; font-weight: 700; margin-bottom: 6px; }
.velkr-ki-kopf b { background: linear-gradient(120deg, #a65b12, #56664f); color: #fff; font-size: .7rem; letter-spacing: .08em; padding: 3px 7px; border-radius: 4px; }
.velkr-ki p { font-size: .9rem; color: var(--velkr-stein); margin-bottom: 10px; }
.velkr-ki .velkr-knopf { width: auto; margin-top: 10px; }
.velkr-ki-meldung { font-size: .9rem; margin-top: 8px; font-weight: 600; }
.velkr-ki-meldung.velkr-gut { color: var(--velkr-salbei); }
.velkr-ki-meldung.velkr-schlecht { color: #a3261b; }
.velkr-ki-ergebnis { position: relative; margin: 12px 0 0; }
.velkr-ki-ergebnis img { width: 100%; height: auto; aspect-ratio: auto; object-fit: contain; border-radius: var(--velkr-r); }
.velkr-ki-ergebnis figcaption { font-size: .8rem; color: var(--velkr-stein); margin-top: 6px; }
.velkr-ki-datei input[type="file"] { font: inherit; min-height: 44px; }
.velkr-laeuft { position: relative; pointer-events: none; opacity: .75; }
.velkr-laeuft::after { content: ""; display: inline-block; width: 14px; height: 14px; margin-left: 8px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: velkr-dreh .8s linear infinite; vertical-align: -2px; }
@keyframes velkr-dreh { to { transform: rotate(360deg); } }
.velkr-planer { scroll-margin-top: 96px; }

/* Kopf über dem Planer auf Kategorie- und Konfigurator-Seite */
.velkr-planer-kopf { display: flex; justify-content: space-between; align-items: end; gap: 16px 40px; flex-wrap: wrap; margin-bottom: 26px; }
.velkr-planer-kopf h1, .velkr-planer-kopf h2 { margin-bottom: 0; }
.velkr-vorteile--quer { display: flex; flex-wrap: wrap; gap: 6px 22px; margin: 0; max-width: 640px; }
.velkr-vorteile--quer li { margin: 0; font-size: .95rem; }
/* Handy: Schalter oben rechts statt unten, damit nichts die Maßzahlen verdeckt (Bühne bleibt gleich hoch) */
@media (max-width: 860px) {
  .velkr-buehne-tasten { position: absolute; right: 0; bottom: calc(max(38vh, 220px) - 58px); }
  .velkr-buehne-tasten .velkr-buehne-taste { font-size: .78rem; padding: 6px 10px; min-height: 36px; }
}
