/* Vorführplatz in 3D (vorfuehrplatz-3d.html): Gestaltung der Quelle quellen/vorfuehrplatz-3d.html, auf .vp3d beschränkt,
   damit sie sich nicht mit .btn/.nav/.facts und den Farben der Webseite beißt. Nur hell, wie alle Webseiten.
   Die Farben der 3D-Szene liest das Skript per getComputedStyle an #stage. */
.vp3d-kopf { padding-top: clamp(1.4rem, 4vw, 2.4rem); padding-bottom: 1.2rem; }  /* nur oben/unten: den Seitenrand gibt .wrap */
.vp3d-kopf h1 { font-size: var(--step-3); margin: 0 0 .5rem; }
.vp3d-kopf .sm-einstieg { margin: 0; max-width: 46rem; }
.vp3d-unten { padding-top: clamp(1.4rem, 4vw, 2.4rem); padding-bottom: clamp(1.4rem, 4vw, 2.4rem); }

.vp3d {
  --v-accent-text: #4a6a00; --v-accent-ink: #172306; --mute: #c4352b;
  --scene-bg: #e4eaee; --scene-floor: #d9e1e6; --scene-line: #8fa2b1; --scene-obj: #173f64; --scene-obj2: #3a6890; --env: #2f74c0; --skin: #c3ced6;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(330px, 420px);
  height: min(820px, calc(100svh - 6rem)); min-height: 560px;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  background: var(--surface); color: var(--ink); font-size: 15px; line-height: 1.55;
}
.vp3d [hidden] { display: none !important; }
.vp3d .stage { position: relative; min-height: 0; overflow: hidden; background: var(--scene-bg); touch-action: none; }
.vp3d .stage canvas { display: block; width: 100%; height: 100%; outline: none; }
.vp3d .labels { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.vp3d .lbl { position: absolute; left: 0; top: 0; white-space: nowrap; font-size: 12px; font-weight: 600; line-height: 1.2; padding: 3px 7px; border-radius: 4px;
  background: color-mix(in srgb, var(--surface) 88%, transparent); color: var(--ink); border: 1px solid var(--line); will-change: transform; }
.vp3d .lbl.spk { font-variant-numeric: tabular-nums; font-stretch: 110%; }
.vp3d .lbl.spk em { font-style: normal; color: var(--mute); margin-left: 5px; font-weight: 700; }
.vp3d .lbl.env { font-weight: 500; font-size: 11px; color: var(--muted); background: transparent; border-color: transparent; padding: 0; }
.vp3d .lbl.voice { background: var(--accent); color: var(--v-accent-ink); border-color: transparent; }
.vp3d .lbl.soft { font-weight: 500; color: var(--muted); }
.vp3d .hint { position: absolute; left: max(12px, env(safe-area-inset-left, 0px)); bottom: 10px; font-size: 12px; color: var(--muted); pointer-events: none; }
.vp3d .nogl { position: absolute; inset: 0; display: grid; place-items: center; padding: 24px; text-align: center; color: var(--muted); }
.vp3d .panel { min-height: 0; overflow: auto; border-left: 1px solid var(--line); background: var(--surface); display: flex; flex-direction: column;
  padding: 18px 20px 22px; gap: 18px; }
.vp3d .meters { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; align-items: end; }
.vp3d .meter { display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 0; }
.vp3d .meter .track { width: 100%; max-width: 38px; height: 54px; border-radius: 3px; background: color-mix(in srgb, var(--line) 70%, transparent); position: relative; overflow: hidden; }
.vp3d .meter .fill { position: absolute; left: 0; right: 0; bottom: 0; height: 0; background: var(--accent); }
.vp3d .meter.muted .fill { background: var(--mute); }
.vp3d .meter span { font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; font-weight: 600; }
.vp3d .meters-cap { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 600; margin-bottom: 6px; }
.vp3d .kicker { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--v-accent-text); font-weight: 700; }
.vp3d .step { padding: 0; margin: 0; }  /* die Webseite gibt jedem <section> großen Innenabstand */
.vp3d .step h2 { font-size: 26px; line-height: 1.12; font-weight: 800; font-stretch: 112%; letter-spacing: -.02em; margin: 4px 0 10px; text-wrap: balance; }
.vp3d .step p { margin: 0 0 10px; max-width: 62ch; }
.vp3d .step .note { font-size: 13px; color: var(--muted); }
.vp3d .step a { color: var(--blue); font-weight: 600; }
.vp3d .ctrl { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }
.vp3d .row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.vp3d button { font: inherit; cursor: pointer; }
/* Knöpfe der Erklärung: klein und kantig, ohne den Pfeil der Webseiten-Knöpfe */
.vp3d .btn { display: inline-block; gap: 0; letter-spacing: 0; box-shadow: none; transition: border-color .15s; line-height: 1.4;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink); border-radius: 6px; padding: 7px 12px; font-size: 14px; font-weight: 600; }
.vp3d .btn::after { content: none; }
@media (hover: hover) and (pointer: fine) { .vp3d .btn:hover { background: var(--surface); color: var(--ink); border-color: var(--blue); } }
.vp3d .btn[aria-pressed="true"] { background: var(--blue); border-color: var(--blue); color: var(--surface); }
.vp3d .btn.primary { background: var(--accent); border-color: var(--accent); color: var(--v-accent-ink); }
.vp3d .btn:disabled { opacity: .45; cursor: default; }
.vp3d .btn:focus-visible, .vp3d input:focus-visible, .vp3d .dot:focus-visible { outline: 2px solid var(--v-accent-text); outline-offset: 2px; }
.vp3d label.rng { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; font-size: 14px; font-weight: 600; }
.vp3d label.rng output { font-variant-numeric: tabular-nums; color: var(--muted); font-weight: 600; }
.vp3d label.rng input { grid-column: 1 / -1; }
.vp3d input[type=range] { width: 100%; accent-color: var(--v-accent-text); }
.vp3d .chan { display: grid; grid-template-columns: 92px minmax(0, 1fr) 44px 74px; gap: 8px; align-items: center; font-size: 13px; }
.vp3d .chan b { font-variant-numeric: tabular-nums; font-weight: 700; }
.vp3d .chan small { display: block; color: var(--muted); font-size: 11px; font-weight: 500; }
.vp3d .chan output { font-variant-numeric: tabular-nums; color: var(--muted); text-align: right; }
.vp3d .chan .btn { padding: 5px 8px; font-size: 12px; }
.vp3d .chan .btn[aria-pressed="true"] { background: var(--mute); border-color: var(--mute); color: #fff; }
.vp3d .readout { font-size: 14px; font-variant-numeric: tabular-nums; padding: 8px 10px; border-radius: 6px; background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--ink); }
.vp3d .facts { display: flex; flex-direction: column; gap: 8px; margin: 6px 0 0; padding: 0; list-style: none; font-size: 14px; }
.vp3d .facts li { padding-left: 14px; position: relative; margin: 0; }
.vp3d .facts li::before { content: ""; position: absolute; left: 0; top: .62em; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.vp3d .sel { user-select: all; font-variant-numeric: tabular-nums; font-weight: 700; }
.vp3d .nav { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-top: 12px; border-top: 1px solid var(--line); }
/* Das Hauptmenü der Webseite heißt auch .nav und wird am Handy zum Klappmenü – für die Schrittleiste zurücknehmen */
.vp3d .nav { position: static; flex-direction: row; visibility: visible; opacity: 1; transform: none !important; pointer-events: auto;
  transition: none !important; max-height: none; overflow: visible; background: none; box-shadow: none; padding: 12px 0 0; border-bottom: 0; }
.vp3d .dots { display: flex; gap: 6px; flex-wrap: wrap; }
.vp3d .dot { width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--line); background: transparent; color: var(--muted); font-size: 12px; font-weight: 700;
  font-variant-numeric: tabular-nums; padding: 0; transition: transform 120ms cubic-bezier(.23,1,.32,1); }
.vp3d .dot:active { transform: scale(.97); }
.vp3d .dot[aria-current="step"] { background: var(--accent); border-color: var(--accent); color: var(--v-accent-ink); }
@media (pointer: coarse) {  /* Fingerziel mindestens 44 px */
  .vp3d .dot { width: 44px; height: 44px; }
  .vp3d .chan .btn { min-width: 44px; min-height: 44px; }
  .vp3d--held .stage { touch-action: pan-y; }  /* Startseite: Bühne am Finger aus (dreht von selbst), die Seite bleibt darüber scrollbar */
}
@media (max-width: 860px) {
  .vp3d { grid-template-columns: 1fr; grid-template-rows: min(50svh, 420px) auto; height: auto; min-height: 0; }
  .vp3d .panel { border-left: 0; border-top: 1px solid var(--line); overflow: visible; }
  .vp3d .step h2 { font-size: 23px; }
  .vp3d .chan { grid-template-columns: 80px minmax(0, 1fr) 40px 68px; }
}
@media (prefers-reduced-motion: reduce) { .vp3d * { transition: none !important; } }

/* Startseite: nur die 3D-Bühne als Bild im Kopfbereich, die Erklärspalte bleibt ausgeblendet (Schritt 1: Boxen und Winkel) */
.vp3d.vp3d--held { display: block; height: auto; min-height: 0; border: 0; background: none; }
.vp3d--held .panel { display: none; }
.vp3d--held .stage { aspect-ratio: 1 / 1; width: 100%; max-width: 440px; margin-inline: auto; }
.sm-bogen-bild figcaption a { color: #fff; font-weight: 600; white-space: nowrap; }
.vp3d--held .hint a { color: var(--blue); font-weight: 600; pointer-events: auto; }  /* .hint selbst lässt Klicks durch */
@media (max-width: 860px) {
  .vp3d--held .stage { max-width: 360px; touch-action: pan-y; }  /* am Handy bleibt die Seite über der Bühne scrollbar */
}
