/* The native-sized fallback is decorative. Original Orbit and all desktop
   elements keep their own rendering and lifecycle. */
@media (max-width: 767.98px) {
  body.fxm-ios-ai main.fxm-ai-page[data-fxm-ai-service-page] .fxm-ios-ai-orbit-fallback[data-fxm-ai-scene]::before,
  body.fxm-ios-ai main.fxm-ai-page[data-fxm-ai-service-page] .fxm-ios-ai-orbit-fallback[data-fxm-ai-scene]::after { content: none; animation: none; }
  .fxm-ios-ai-orbit-fallback[data-fxm-ai-scene] { isolation: isolate; }
  .fxm-ios-ai-orbit-fallback[data-fxm-ai-scene] .fxm-ai-avatar-art { position: relative; display: block; width: 44px; height: 44px; flex: none; pointer-events: none; }
  .fxm-ai-avatar-art *, .fxm-ai-avatar-art *::before, .fxm-ai-avatar-art *::after { box-sizing: border-box; }
  .fxm-ai-avatar-ball { position: absolute; inset: 6px; border-radius: 50%; background: radial-gradient(ellipse at 30% 18%, #b79bef 0, #8b63d5 24%, #6742bd 64%, #503293 100%); box-shadow: inset -2px -3px 5px #42247c3d, inset 1px 2px 4px #ffffff59, 0 2px 4px #62409a12; animation: fxm-ai-avatar-breathe 4s ease-in-out infinite; }
  .fxm-ai-avatar-face { position: absolute; inset: 0; }
  .fxm-ai-avatar-eye { position: absolute; top: 11px; width: 3px; height: 7px; border-radius: 50%; background: #fff; animation: fxm-ai-avatar-blink 5.5s ease-in-out infinite; }
  .fxm-ai-avatar-eye--left { left: 10px; }
  .fxm-ai-avatar-eye--right { right: 10px; }
  .fxm-ai-avatar-mouth { position: absolute; top: 21px; left: 14px; width: 4px; height: 1.5px; border-radius: 2px; background: #ffffffb3; }
  .fxm-ai-avatar-halo { position: absolute; inset: 3px; border: 1px solid #9971d640; border-radius: 50%; opacity: 0; }
  .fxm-ai-avatar-badge { position: absolute; right: 0; bottom: 1px; display: none; place-items: center; width: 16px; height: 16px; border: 1.5px solid #f8f9fb; border-radius: 50%; color: #6040c0; background: #f3edff; box-shadow: 0 1px 3px #4d2e8a21; }
  .fxm-ai-avatar-symbol { display: none; width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
  .fxm-ai-avatar-spark { position: absolute; width: 4px; height: 4px; border-radius: 50%; background: #a57adb; opacity: 0; }
  .fxm-ai-avatar-spark--one { top: 3px; left: 4px; }
  .fxm-ai-avatar-spark--two { top: 12px; right: 0; }

  [data-fxm-ai-scene="listening"] .fxm-ai-avatar-halo { opacity: 1; animation: fxm-ai-avatar-listen 1.7s ease-in-out infinite; }
  [data-fxm-ai-scene="listening"] .fxm-ai-avatar-eye { height: 8px; top: 10px; }
  [data-fxm-ai-scene="listening"] .fxm-ai-avatar-mouth { height: 2px; width: 3px; }
  [data-fxm-ai-scene="sending"] .fxm-ai-avatar-ball { animation: fxm-ai-avatar-send .8s ease-in-out infinite; }
  [data-fxm-ai-scene="sending"] .fxm-ai-avatar-halo { opacity: .7; border-style: dashed; animation: fxm-ai-avatar-spin 3s linear infinite; }
  [data-fxm-ai-scene="thinking"] .fxm-ai-avatar-face { transform: translateY(-2px); }
  [data-fxm-ai-scene="thinking"] .fxm-ai-avatar-mouth { width: 3px; height: 3px; border: 1px solid #fff; background: none; border-radius: 50%; }
  [data-fxm-ai-scene="thinking"] .fxm-ai-avatar-spark { opacity: .8; animation: fxm-ai-avatar-think 1.5s ease-in-out infinite; }
  [data-fxm-ai-scene="thinking"] .fxm-ai-avatar-spark--two { animation-delay: .3s; }
  [data-fxm-ai-scene="searching"] .fxm-ai-avatar-face { animation: fxm-ai-avatar-scan 2.4s ease-in-out infinite; }
  [data-fxm-ai-scene="searching"] .fxm-ai-avatar-badge,
  [data-fxm-ai-scene="working"] .fxm-ai-avatar-badge,
  [data-fxm-ai-scene="reading"] .fxm-ai-avatar-badge,
  [data-fxm-ai-scene="complete"] .fxm-ai-avatar-badge,
  [data-fxm-ai-scene="error"] .fxm-ai-avatar-badge,
  [data-fxm-ai-scene="stopping"] .fxm-ai-avatar-badge,
  [data-fxm-ai-scene="resuming"] .fxm-ai-avatar-badge { display: grid; }
  [data-fxm-ai-scene="searching"] .fxm-ai-avatar-symbol--search,
  [data-fxm-ai-scene="working"] .fxm-ai-avatar-symbol--work,
  [data-fxm-ai-scene="reading"] .fxm-ai-avatar-symbol--read,
  [data-fxm-ai-scene="complete"] .fxm-ai-avatar-symbol--complete,
  [data-fxm-ai-scene="error"] .fxm-ai-avatar-symbol--error,
  [data-fxm-ai-scene="stopping"] .fxm-ai-avatar-symbol--stop,
  [data-fxm-ai-scene="resuming"] .fxm-ai-avatar-symbol--resume { display: block; }
  [data-fxm-ai-scene="working"] .fxm-ai-avatar-symbol--work { animation: fxm-ai-avatar-spin 4s linear infinite; }
  [data-fxm-ai-scene="working"] .fxm-ai-avatar-eye { height: 5px; top: 13px; }
  [data-fxm-ai-scene="reading"] .fxm-ai-avatar-face { transform: translateY(2px); animation: fxm-ai-avatar-read 2.2s ease-in-out infinite; }
  [data-fxm-ai-scene="reading"] .fxm-ai-avatar-eye { height: 5px; }
  [data-fxm-ai-scene="responding"] .fxm-ai-avatar-mouth { top: 20px; left: 13px; width: 6px; height: 4px; border-radius: 1px 1px 5px 5px; animation: fxm-ai-avatar-talk .8s ease-in-out infinite; }
  [data-fxm-ai-scene="responding"] .fxm-ai-avatar-halo { opacity: .5; animation: fxm-ai-avatar-listen 2s ease-in-out infinite; }
  [data-fxm-ai-scene="complete"] .fxm-ai-avatar-eye { top: 12px; height: 4px; width: 5px; border: 1.5px solid #fff; border-bottom: 0; border-radius: 5px 5px 0 0; background: none; animation: none; }
  [data-fxm-ai-scene="complete"] .fxm-ai-avatar-eye--left { left: 8px; }
  [data-fxm-ai-scene="complete"] .fxm-ai-avatar-eye--right { right: 8px; }
  [data-fxm-ai-scene="complete"] .fxm-ai-avatar-mouth { left: 13px; width: 6px; height: 3px; border-radius: 0 0 5px 5px; background: #fff; }
  [data-fxm-ai-scene="complete"] .fxm-ai-avatar-badge { background: #e8f5ed; color: #38865c; }
  [data-fxm-ai-scene="complete"][data-fxm-ai-accent="true"] .fxm-ai-avatar-ball { animation: fxm-ai-avatar-celebrate .65s ease-out 1; }
  [data-fxm-ai-scene="complete"][data-fxm-ai-accent="true"] .fxm-ai-avatar-spark { animation: fxm-ai-avatar-sparkle 1s ease-out 1; }
  [data-fxm-ai-scene="error"] .fxm-ai-avatar-ball { background: radial-gradient(ellipse at 30% 18%, #c6a9d9, #9771ad 50%, #79598f); }
  [data-fxm-ai-scene="error"] .fxm-ai-avatar-eye { height: 5px; top: 12px; transform: rotate(-12deg); }
  [data-fxm-ai-scene="error"] .fxm-ai-avatar-eye--right { transform: rotate(12deg); }
  [data-fxm-ai-scene="error"] .fxm-ai-avatar-mouth { top: 21px; left: 13px; width: 6px; height: 3px; border: 1px solid #fff; border-bottom: 0; border-radius: 6px 6px 0 0; background: none; }
  [data-fxm-ai-scene="error"] .fxm-ai-avatar-badge { color: #9b6320; background: #fff0d9; }
  [data-fxm-ai-scene="error"][data-fxm-ai-accent="true"] .fxm-ai-avatar-ball { animation: fxm-ai-avatar-error .35s ease-out 1; }
  [data-fxm-ai-scene="stopping"] .fxm-ai-avatar-ball { animation: none; }
  [data-fxm-ai-scene="stopping"] .fxm-ai-avatar-eye { height: 4px; top: 13px; animation: none; }
  [data-fxm-ai-scene="stopping"] .fxm-ai-avatar-symbol--stop { fill: currentColor; stroke: none; }
  [data-fxm-ai-scene="resuming"] .fxm-ai-avatar-symbol--resume { animation: fxm-ai-avatar-spin 1.6s linear infinite; }
  [data-fxm-ai-scene="resuming"] .fxm-ai-avatar-halo { opacity: .6; border-style: dashed; }

  [data-fxm-ai-paused="true"] .fxm-ai-avatar-art *,
  [data-fxm-ai-paused="true"] .fxm-ai-avatar-art *::before,
  [data-fxm-ai-paused="true"] .fxm-ai-avatar-art *::after { animation-play-state: paused !important; }
  [data-fxm-ai-reduced="true"] .fxm-ai-avatar-art * { animation: none !important; transition: none !important; }
  @keyframes fxm-ai-avatar-breathe { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-1px); } }
  @keyframes fxm-ai-avatar-blink { 0%,44%,48%,100% { scale: 1 1; } 46% { scale: 1 .15; } }
  @keyframes fxm-ai-avatar-listen { 0%,100% { scale: .96; opacity: .3; } 50% { scale: 1.08; opacity: .85; } }
  @keyframes fxm-ai-avatar-send { 0%,100% { transform: translate(0,0) rotate(0); } 50% { transform: translate(1px,-2px) rotate(-7deg); } }
  @keyframes fxm-ai-avatar-think { 0%,100% { transform: translateY(0); opacity: .3; } 50% { transform: translateY(-2px); opacity: 1; } }
  @keyframes fxm-ai-avatar-spin { to { rotate: 360deg; } }
  @keyframes fxm-ai-avatar-scan { 0%,100% { transform: translateX(-1px); } 50% { transform: translateX(2px); } }
  @keyframes fxm-ai-avatar-read { 0%,100% { transform: translate(-1px,2px); } 45% { transform: translate(1px,2px); } }
  @keyframes fxm-ai-avatar-talk { 0%,100% { transform: scaleY(.5); } 50% { transform: scaleY(1); } }
  @keyframes fxm-ai-avatar-celebrate { 0%,100% { transform: translateY(0); } 40% { transform: translateY(-3px) rotate(-6deg); } 75% { transform: translateY(-1px) rotate(3deg); } }
  @keyframes fxm-ai-avatar-sparkle { 0% { scale: .3; opacity: 0; } 35% { scale: 1; opacity: 1; } 100% { scale: 1.3; opacity: 0; } }
  @keyframes fxm-ai-avatar-error { 0%,100% { transform: translateX(0); } 25%,75% { transform: translateX(-1.5px); } 50% { transform: translateX(1.5px); } }
}
@media (max-width: 767.98px) and (prefers-reduced-motion: reduce) {
  .fxm-ios-ai-orbit-fallback[data-fxm-ai-scene] .fxm-ai-avatar-art * { animation: none !important; transition: none !important; }
}
