/* Flynker AI host: avatar guided tour + voice Q&A */
.fb-launch { position: fixed; right: 22px; bottom: 22px; z-index: 900; display: flex; align-items: center; gap: 12px; padding: 8px 22px 8px 8px; border: 0; border-radius: 999px; background: linear-gradient(135deg, var(--pink), var(--pink-deep)); color: var(--white); font-family: var(--font-body); text-align: left; cursor: pointer; box-shadow: var(--shadow-lg); transition: transform .3s var(--ease), opacity .3s; }
.fb-launch:hover { transform: translateY(-2px); }
.fb-launch-av { position: relative; width: 52px; height: 52px; flex: 0 0 52px; }
.fb-launch-av::after { content: ""; position: absolute; right: 1px; bottom: 2px; width: 12px; height: 12px; border-radius: 50%; background: #3ddc84; border: 2px solid var(--white); }
.fb-launch-av img { width: 100%; height: 100%; display: block; border-radius: 50%; object-fit: cover; border: 2px solid var(--white); }
.fb-launch-txt b { display: block; font-size: 15px; line-height: 1.2; }
.fb-launch-txt small { display: block; font-size: 12.5px; opacity: .85; margin-top: 2px; }
.fb-open .fb-launch { opacity: 0; pointer-events: none; transform: scale(.9); }

.fb-hello { position: fixed; right: 22px; bottom: 96px; z-index: 900; max-width: 300px; padding: 16px 40px 16px 18px; background: var(--white); border: 1px solid var(--line); border-radius: 18px 18px 4px 18px; box-shadow: var(--shadow-sm); font: 14.5px/1.5 var(--font-body); color: var(--ink); cursor: pointer; animation: fbIn .5s var(--ease); }
.fb-hello b { color: var(--pink-deep); }
.fb-hello button { position: absolute; top: 8px; right: 8px; width: 26px; height: 26px; border: 0; border-radius: 50%; background: var(--pink-light); color: var(--pink-deep); font-size: 15px; cursor: pointer; }

.fb-dock { position: fixed; right: 22px; bottom: 22px; z-index: 901; width: 410px; max-height: calc(100vh - 44px); display: none; flex-direction: column; background: var(--white); border-radius: 26px; box-shadow: 0 30px 90px -20px rgba(21, 9, 18, .5); overflow: hidden; font-family: var(--font-body); animation: fbIn .4s var(--ease); }
.fb-open .fb-dock { display: flex; }
.fb-dock-head { display: flex; align-items: center; gap: 10px; padding: 10px 10px 10px 18px; background: var(--ink); color: rgba(255,255,255,.8); font-size: 12.5px; }
.fb-dock-head span { flex: 1; min-width: 0; }
.fb-dock-head b { color: var(--white); font-size: 13.5px; }
.fb-x { width: 32px; height: 32px; border: 0; border-radius: 50%; background: rgba(255,255,255,.12); color: var(--white); display: grid; place-items: center; cursor: pointer; }
.fb-x:hover { background: rgba(255,255,255,.24); }
.fb-x svg { width: 16px; height: 16px; }

.fb-dock-body { display: flex; gap: 16px; align-items: flex-start; padding: 18px 18px 8px; background: radial-gradient(120% 90% at 0% 0%, var(--pink-light), var(--white) 70%); }
.fb-avatar { position: relative; flex: 0 0 132px; width: 132px; height: 132px; }
.fb-avatar .fb-av { position: relative; width: 100%; height: 100%; border-radius: 50%; overflow: hidden; background: #c47a5a; box-shadow: 0 0 0 4px var(--white), 0 0 0 6px transparent, 0 14px 26px -6px rgba(214, 6, 133, .4); transition: box-shadow .3s; }
.fb-av img, .fb-av video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.fb-av video { opacity: 0; transition: opacity .25s; }
.fb-av.fb-talking video { opacity: 1; }
.fb-badge { position: absolute; left: 50%; bottom: -8px; transform: translateX(-50%); white-space: nowrap; padding: 3px 10px; border-radius: 999px; background: var(--ink); color: var(--white); font-size: 11px; font-weight: 700; letter-spacing: .03em; }
.fb-badge:empty { display: none; }
[data-state="listening"] .fb-badge { background: #1f9d57; }
[data-state="speaking"] .fb-badge { background: var(--pink); }
.fb-side { flex: 1; min-width: 0; }
.fb-where { margin: 2px 0 6px; font: 700 11.5px/1.3 var(--font-body); letter-spacing: .06em; text-transform: uppercase; color: var(--pink-deep); }
.fb-progress { height: 4px; border-radius: 4px; background: rgba(214, 6, 133, .14); overflow: hidden; margin-bottom: 10px; }
.fb-progress i { display: block; height: 100%; width: 0; background: var(--pink); border-radius: 4px; transition: width .6s var(--ease); }
.fb-caption { margin: 0; max-height: 9.4em; overflow-y: auto; font: 500 14.5px/1.55 var(--font-body); color: var(--ink); }

/* avatar life */
[data-state="speaking"] .fb-avatar .fb-av { box-shadow: 0 0 0 4px var(--white), 0 0 0 6px var(--pink), 0 14px 26px -6px rgba(214, 6, 133, .4); }
[data-state="listening"] .fb-avatar .fb-av { box-shadow: 0 0 0 4px var(--white), 0 0 0 6px #3ddc84, 0 14px 26px -6px rgba(31, 157, 87, .45); animation: fbGlow 1.2s infinite; }

.fb-ctrl { display: flex; flex-wrap: wrap; gap: 8px; padding: 14px 18px 4px; }
.fb-btn { display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--line); border-radius: 999px; padding: 9px 14px; background: var(--white); color: var(--ink); font: 700 13px/1 var(--font-body); cursor: pointer; transition: background .2s, border-color .2s; }
.fb-btn:hover { border-color: var(--pink); }
.fb-btn svg { width: 16px; height: 16px; }
.fb-btn[hidden] { display: none; }
.fb-primary { margin-left: auto; border-color: transparent; background: var(--ink); color: var(--white); }
.fb-primary:hover { background: var(--pink-deep); }
[data-state="listening"] .fb-primary { background: #1f9d57; animation: fbPulse 1.2s infinite; }
[data-mode="qa"] .fb-primary { margin-left: 0; flex: 1; justify-content: center; padding: 12px 16px; font-size: 14px; }

.fb-chips { display: none; gap: 6px; padding: 10px 18px 0; overflow-x: auto; scrollbar-width: none; }
.fb-chips::-webkit-scrollbar { display: none; }
[data-mode="qa"] .fb-chips { display: flex; flex-wrap: wrap; }
.fb-chips button { flex: 0 0 auto; border: 1px solid var(--pink); background: var(--white); color: var(--pink-deep); border-radius: 999px; padding: 6px 11px; font: 600 12.5px/1.2 var(--font-body); cursor: pointer; }
.fb-chips button:hover { background: var(--pink-light); }
.fb-type { display: flex; gap: 8px; margin: 10px 18px 8px; }
.fb-type input { flex: 1; min-width: 0; border: 1px solid var(--line); border-radius: 999px; padding: 10px 14px; font: 14px/1.3 var(--font-body); color: var(--ink); background: var(--white); outline: none; }
.fb-type input:focus { border-color: var(--pink); }
.fb-type button { flex: 0 0 40px; height: 40px; border: 0; border-radius: 50%; background: var(--pink); color: var(--white); display: grid; place-items: center; cursor: pointer; }
.fb-type button svg { width: 18px; height: 18px; }
.fb-foot { margin: 0; padding: 0 16px 12px; font-size: 11px; line-height: 1.45; color: var(--ink-soft); text-align: center; }
.fb-foot a { color: var(--pink-deep); font-weight: 700; }

/* the section being presented */
.fb-spot { position: relative; }
.fb-spot::after { content: ""; position: absolute; inset: 8px; border-radius: 28px; border: 2px solid var(--pink); box-shadow: 0 0 0 6px rgba(214, 6, 133, .12); pointer-events: none; animation: fbSpot .7s var(--ease); z-index: 5; }

@keyframes fbIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes fbPulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(31,157,87,.5); } 50% { box-shadow: 0 0 0 8px rgba(31,157,87,0); } }
@keyframes fbGlow { 50% { box-shadow: 0 0 0 4px var(--white), 0 0 0 9px rgba(61, 220, 132, .45), 0 14px 26px -6px rgba(31, 157, 87, .45); } }
@keyframes fbSpot { from { opacity: 0; transform: scale(.985); } to { opacity: 1; transform: none; } }

@media (max-width: 560px) {
  .fb-launch { right: 12px; bottom: 12px; padding: 6px 16px 6px 6px; }
  .fb-launch-av { width: 44px; height: 44px; flex-basis: 44px; }
  .fb-hello { right: 12px; left: 12px; bottom: 76px; max-width: none; }
  .fb-dock { right: 0; left: 0; bottom: 0; width: auto; max-height: 62vh; max-height: 62dvh; border-radius: 22px 22px 0 0; }
  .fb-dock-body { gap: 12px; padding: 14px 14px 6px; }
  .fb-avatar { flex-basis: 84px; width: 84px; height: 84px; }
  .fb-caption { font-size: 14px; max-height: 7.8em; }
  .fb-ctrl { padding: 12px 14px 2px; }
  .fb-type { margin: 8px 14px 6px; }
  [data-mode="qa"] .fb-chips { flex-wrap: nowrap; padding: 8px 14px 0; }
  .fb-foot { font-size: 10.5px; }
}
@media (prefers-reduced-motion: reduce) {
  .fb-launch, .fb-hello, .fb-dock, .fb-av, .fb-spot::after, .fb-primary { animation: none !important; transition: none !important; }
}
