/* ═══════════════════════════════════════════════════════════
   FLOW-BUTTON — Website-Version: Lila auf leerem Canvas.
   Kein Container, keine Nav-Bar. Handle = Site-Button.
   Nur die aktive Route wird verbunden; inaktive bleiben sichtbar.
═══════════════════════════════════════════════════════════ */
.FB-STAGE-WRAP { margin-top: 8px; display: flex; flex-direction: column; align-items: center; }

.FB-STAGE {
  --acc: #7C5FE0;
  --acc2: #9B8BF7;
  position: relative;
  width: min(360px, 92vw);
  aspect-ratio: 360 / 470;
  background: transparent;
  touch-action: none;
  -webkit-user-select: none; user-select: none;
}

/* Verbindungslinien — VOR den Bubbles */
.FB-LINES { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 4; overflow: visible; }
.FB-LINE { stroke: var(--acc); stroke-width: 2.5; fill: none; stroke-linecap: round; filter: drop-shadow(0 0 4px rgba(124,95,224,.4)); }

/* Bubbles */
.FB-NODES { position: absolute; inset: 0; pointer-events: none; z-index: 3; }
.FB-BUB {
  position: absolute;
  border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(255,255,255,.7);
  border: 1px solid rgba(124,95,224,.2);
  color: var(--muted-ink);
  box-shadow: 0 6px 18px -8px rgba(124,95,224,.3);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  opacity: 0;
  transform: translate(-50%,-50%) scale(.55);
  transition: transform .13s cubic-bezier(.34,1.56,.64,1), background .13s, border-color .13s, box-shadow .13s, color .13s, opacity .1s;
}
.FB-BUB.show { opacity: 1; transform: translate(-50%,-50%) scale(1); }
.FB-BUB.group  { width: 44px; height: 44px; }
.FB-BUB.target { width: 40px; height: 40px; }
.FB-BUB svg { width: 15px; height: 15px; }
.FB-BUB.active {
  background: rgba(124,95,224,.14);
  border: 1.5px solid rgba(124,95,224,.55);
  color: var(--acc);
  box-shadow: 0 0 18px rgba(124,95,224,.4), 0 8px 20px -8px rgba(124,95,224,.5);
  transform: translate(-50%,-50%) scale(1.14);
}
.FB-BUB.active svg { width: 17px; height: 17px; }
.FB-BUB.commit { background: rgba(124,95,224,.28); box-shadow: 0 0 28px rgba(124,95,224,.6); }

/* Handle — wie ein Site-Button (Lila-Verlauf) */
.FB-HANDLE {
  position: absolute;
  width: 52px; height: 52px;
  transform: translate(-50%,-50%);
  border-radius: 50%;
  display: grid; place-items: center;
  background: linear-gradient(135deg, var(--acc2), var(--acc));
  border: 1px solid rgba(255,255,255,.25);
  box-shadow: 0 10px 26px -8px rgba(124,95,224,.6), inset 0 1px 0 rgba(255,255,255,.3);
  color: #fff;
  z-index: 5;
  cursor: default;
  touch-action: none;
  transition: box-shadow .2s, transform .12s;
}
.FB-HANDLE.open { box-shadow: 0 12px 30px -6px rgba(124,95,224,.75), 0 0 0 6px rgba(124,95,224,.12); }
.FB-HANDLE.voice { background: linear-gradient(135deg, #C4B6FB, var(--acc)); box-shadow: 0 0 0 8px rgba(124,95,224,.14), 0 12px 30px -6px rgba(124,95,224,.8); }
.FB-HANDLE svg { width: 20px; height: 20px; }
.FB-HANDLE.rest { animation: fbBreathe 3.5s ease-in-out infinite; }
@keyframes fbBreathe { 0%,100% { box-shadow: 0 10px 26px -8px rgba(124,95,224,.6), inset 0 1px 0 rgba(255,255,255,.3); } 50% { box-shadow: 0 12px 30px -6px rgba(124,95,224,.85), 0 0 0 7px rgba(124,95,224,.1), inset 0 1px 0 rgba(255,255,255,.3); } }

/* HUD-Indikator (oben) — helles Glas */
.FB-HUD {
  position: absolute; left: 50%; transform: translateX(-50%) translateY(6px);
  width: min(200px, 62%);
  background: rgba(255,255,255,.82);
  border: 1px solid rgba(124,95,224,.28);
  border-radius: 22px;
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  box-shadow: 0 20px 44px -20px rgba(124,95,224,.4);
  padding: 15px 16px 18px;
  text-align: center;
  z-index: 6;
  opacity: 0; pointer-events: none;
  transition: opacity .22s ease, transform .35s cubic-bezier(.34,1.56,.64,1);
}
.FB-HUD.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.FB-HUD-ICO {
  width: 52px; height: 52px; border-radius: 20px; margin: 0 auto 10px;
  background: rgba(124,95,224,.12);
  border: 1.2px solid rgba(124,95,224,.4);
  display: grid; place-items: center; color: var(--acc);
}
.FB-HUD-ICO svg { width: 26px; height: 26px; }
.FB-HUD-TI  { font-family: var(--S); font-weight: 700; font-size: 16.5px; color: var(--k); letter-spacing: -.01em; }
.FB-HUD-SUB { font-family: var(--S); font-size: 12.5px; color: var(--acc); margin-top: 2px; }

/* Deep-Flow: Auswahl-Panel (Kontakte / Nutzer) */
.FB-PICK {
  position: absolute; left: 50%; transform: translateX(-50%) translateY(10px);
  width: min(232px, 78%);
  background: rgba(255,255,255,.9); border: 1px solid rgba(124,95,224,.24);
  border-radius: 22px; -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  box-shadow: 0 22px 50px -22px rgba(124,95,224,.42);
  padding: 12px; z-index: 6; opacity: 0; pointer-events: none;
  transition: opacity .27s, transform .43s cubic-bezier(.34,1.56,.64,1);
}
.FB-PICK.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.FB-PICK-T { font-family: var(--M); font-size: 9.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--accent-ink); margin: 2px 2px 9px; }
.FB-CHIP { display: flex; align-items: center; gap: 9px; padding: 7px 9px; border-radius: 12px; background: rgba(124,95,224,.04); border: 1px solid rgba(124,95,224,.1); margin-bottom: 7px; transition: background .2s, border-color .2s; }
.FB-CHIP.active { background: rgba(124,95,224,.14); border-color: rgba(124,95,224,.5); }
.FB-CHIP-AV { width: 26px; height: 26px; border-radius: 50%; background: linear-gradient(135deg, var(--acc2), var(--acc)); display: grid; place-items: center; font-family: var(--S); font-weight: 700; font-size: 11px; color: #fff; flex: 0 0 auto; }
.FB-CHIP-NM { font-family: var(--S); font-size: 13px; color: var(--k); }
.FB-SEARCH { display: flex; align-items: center; gap: 8px; padding: 8px 11px; border-radius: 100px; background: rgba(124,95,224,.05); border: 1px solid rgba(124,95,224,.12); margin-top: 3px; color: var(--muted-ink); font-family: var(--S); font-size: 12px; }
.FB-SEARCH svg { width: 14px; height: 14px; }

/* Deep-Flow: Vorlagen */
.FB-TPL {
  position: absolute; left: 50%; transform: translateX(-50%) translateY(10px);
  width: min(244px, 82%); z-index: 6; opacity: 0; pointer-events: none;
  transition: opacity .27s, transform .43s cubic-bezier(.34,1.56,.64,1);
}
.FB-TPL.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.FB-TPL-T { font-family: var(--M); font-size: 9.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--accent-ink); text-align: center; margin-bottom: 8px; }
.FB-TPL-ROW { display: flex; gap: 10px; }
.FB-TPL-C { flex: 1; background: rgba(255,255,255,.9); border: 1px solid rgba(124,95,224,.16); border-radius: 16px; padding: 11px; -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); box-shadow: 0 14px 34px -18px rgba(124,95,224,.4); transition: border-color .2s, background .2s, transform .2s; }
.FB-TPL-C.active { border-color: rgba(124,95,224,.55); background: rgba(124,95,224,.1); transform: translateY(-3px); }
.FB-TPL-PV { height: 42px; border-radius: 8px; background: rgba(124,95,224,.06); margin-bottom: 8px; display: flex; flex-direction: column; gap: 4px; padding: 7px; }
.FB-TPL-PV i { height: 4px; border-radius: 2px; background: rgba(124,95,224,.5); }
.FB-TPL-PV i:nth-child(2) { width: 70%; background: rgba(12,11,8,.14); }
.FB-TPL-PV i:nth-child(3) { width: 50%; background: rgba(12,11,8,.14); }
.FB-TPL-L { font-family: var(--S); font-weight: 600; font-size: 12px; color: var(--k); text-align: center; }

/* Deep-Flow: Fokus-Fenster */
.FB-FOCUS {
  position: absolute; left: 8%; right: 8%; top: 8%; bottom: 84px;
  background: rgba(255,255,255,.94); border: 1px solid rgba(124,95,224,.28);
  border-radius: 20px; z-index: 7; opacity: 0; transform: scale(.94); pointer-events: none;
  transition: opacity .4s, transform .57s cubic-bezier(.34,1.56,.64,1);
  box-shadow: 0 26px 64px -22px rgba(124,95,224,.45);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  overflow: hidden;
}
.FB-FOCUS.show { opacity: 1; transform: scale(1); }
.FB-FOCUS-BAR { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid rgba(12,11,8,.07); }
.FB-FOCUS-IC { width: 32px; height: 32px; border-radius: 10px; background: rgba(124,95,224,.12); border: 1px solid rgba(124,95,224,.4); display: grid; place-items: center; color: var(--acc); flex: 0 0 auto; }
.FB-FOCUS-IC svg { width: 17px; height: 17px; }
.FB-FOCUS-TI { font-family: var(--S); font-weight: 700; font-size: 15px; color: var(--k); line-height: 1.15; }
.FB-FOCUS-SUB { font-family: var(--S); font-size: 11px; color: var(--acc); }
.FB-FOCUS-BODY { padding: 16px; display: flex; flex-direction: column; gap: 11px; }
.FB-FOCUS-BODY i { height: 12px; border-radius: 5px; background: rgba(12,11,8,.06); }
.FB-FOCUS-BODY i.acc { background: rgba(124,95,224,.2); width: 55%; }
.FB-FOCUS-BODY i.w70 { width: 70%; } .FB-FOCUS-BODY i.w40 { width: 40%; }

/* Voice-Loop (Long-Press) */
.FB-VOICE {
  position: absolute; left: 50%; transform: translateX(-50%) translateY(10px);
  width: min(236px, 78%);
  background: rgba(255,255,255,.9); border: 1px solid rgba(124,95,224,.24);
  border-radius: 22px; -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  box-shadow: 0 22px 50px -22px rgba(124,95,224,.42);
  padding: 16px 16px 18px; text-align: center; z-index: 6; opacity: 0; pointer-events: none;
  transition: opacity .27s, transform .4s cubic-bezier(.34,1.56,.64,1);
}
.FB-VOICE.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.FB-VOICE-WAVE { display: flex; align-items: center; justify-content: center; gap: 4px; height: 26px; margin-bottom: 12px; }
.FB-VOICE-WAVE i { width: 3.5px; border-radius: 2px; background: var(--acc); height: 8px; animation: fbWave 1.35s ease-in-out infinite; }
.FB-VOICE-WAVE i:nth-child(2){animation-delay:.12s} .FB-VOICE-WAVE i:nth-child(3){animation-delay:.24s} .FB-VOICE-WAVE i:nth-child(4){animation-delay:.36s} .FB-VOICE-WAVE i:nth-child(5){animation-delay:.48s} .FB-VOICE-WAVE i:nth-child(6){animation-delay:.6s} .FB-VOICE-WAVE i:nth-child(7){animation-delay:.72s}
@keyframes fbWave { 0%,100%{height:7px} 50%{height:24px} }
.FB-VOICE-TXT { font-family: var(--R); font-style: italic; font-size: 16px; color: var(--k); min-height: 1.3em; line-height: 1.3; }
.FB-VOICE-DONE { font-family: var(--S); font-size: 12.5px; color: var(--acc); margin-top: 8px; }

/* Hint + Caption */
.FB-HINT {
  position: absolute; left: 50%; bottom: 4px; transform: translateX(-50%);
  font-family: var(--M); font-size: 11px; letter-spacing: .08em; color: var(--accent-ink);
  z-index: 2; opacity: 0; transition: opacity .4s; white-space: nowrap;
}
.FB-HINT.show { opacity: 1; animation: fbHint 2s ease-in-out infinite; }
@keyframes fbHint { 0%,100% { transform: translateX(-50%) translateY(0); } 50% { transform: translateX(-50%) translateY(-5px); } }
.FB-CAP { margin-top: 22px; font-family: var(--M); font-size: 11.5px; letter-spacing: .05em; color: var(--muted-ink); text-align: center; }

@media (prefers-reduced-motion: reduce) {
  .FB-HANDLE.rest, .FB-HINT.show, .FB-VOICE-WAVE i { animation: none; }
}
