
  .m360-bubbles {
    /* Navy background (default): matches the brand guide back cover */
    --cb-a-fill: #53A9DA;  --cb-a-dots: #FFFFFF;
    --cb-b-fill: #073159;  --cb-b-stroke: #FFFFFF; --cb-b-dots: #FDC648;
    --cb-accent-1: #FDC648; --cb-accent-2: #53A9DA; --cb-accent-3: #FFFFFF;
    --cb-wave: #FDC648;
    width: 100%;
    max-width: 340px;
    perspective: 900px;
  }
  .m360-bubbles[data-bg="white"] {
    --cb-a-fill: #53A9DA;  --cb-a-dots: #FFFFFF;
    --cb-b-fill: #FFFFFF;  --cb-b-stroke: #073159; --cb-b-dots: #073159;
    --cb-accent-1: #FDC648; --cb-accent-2: #53A9DA; --cb-accent-3: #073159;
    --cb-wave: #FDC648;
  }
  .m360-bubbles[data-bg="sky"] {
    --cb-a-fill: #073159;  --cb-a-dots: #FFFFFF;
    --cb-b-fill: #53A9DA;  --cb-b-stroke: #073159; --cb-b-dots: #073159;
    --cb-accent-1: #FDC648; --cb-accent-2: #073159; --cb-accent-3: #FFFFFF;
    --cb-wave: #073159;
  }
  .m360-bubbles svg { display: block; width: 100%; height: auto; overflow: visible; transform-style: preserve-3d; }
  .m360-bubbles .cb-a-fill  { fill: var(--cb-a-fill); }
  .m360-bubbles .cb-a-dots  { fill: var(--cb-a-dots); }
  .m360-bubbles .cb-b-shape { fill: var(--cb-b-fill); stroke: var(--cb-b-stroke); }
  .m360-bubbles .cb-b-dots  { fill: var(--cb-b-dots); }
  .m360-bubbles .cb-acc-1 { fill: var(--cb-accent-1); }
  .m360-bubbles .cb-acc-2 { stroke: var(--cb-accent-2); fill: none; }
  .m360-bubbles .cb-acc-3 { fill: var(--cb-accent-3); }
  .m360-bubbles .cb-acc-4 { fill: var(--cb-accent-2); }
  .m360-bubbles .cb-wave  { stroke: var(--cb-wave); }

  /* 1. Pop in: blue bubble first, then the reply */
  .m360-bubbles .cb-pop { transform-box: fill-box; animation: cb-pop 0.8s cubic-bezier(.2,1.4,.4,1) both; }
  .m360-bubbles .cb-pop-a { transform-origin: 15% 100%; animation-delay: 0.2s; }
  .m360-bubbles .cb-pop-b { transform-origin: 85% 100%; animation-delay: 0.75s; }
  @keyframes cb-pop { 0% { transform: scale(0.2); opacity: 0; } 60% { opacity: 1; } 100% { transform: scale(1); opacity: 1; } }

  /* 2. Gentle float */
  .m360-bubbles .cb-bob { animation: cb-bob 6s ease-in-out infinite; }
  .m360-bubbles .cb-bob-b { animation-delay: -3s; }
  @keyframes cb-bob { 50% { transform: translateY(-6px); } }

  /* 3. Turn-taking typing dots */
  .m360-bubbles .cb-typing circle {
    transform-box: fill-box; transform-origin: center;
    animation: cb-typing 1.1s ease-in-out infinite;
    animation-play-state: paused;
  }
  .m360-bubbles .cb-typing circle:nth-child(2) { animation-delay: 0.15s; }
  .m360-bubbles .cb-typing circle:nth-child(3) { animation-delay: 0.3s; }
  .m360-bubbles .talk-a .cb-dots-a circle,
  .m360-bubbles .talk-b .cb-dots-b circle { animation-play-state: running; }
  @keyframes cb-typing { 0%, 60%, 100% { transform: translateY(0); } 30% { transform: translateY(-8px); } }

  /* 4. Dots become a heart */
  .m360-bubbles .cb-dots-a, .m360-bubbles .cb-heart {
    transition: opacity 0.35s ease, transform 0.45s cubic-bezier(.2,1.4,.4,1);
    transform-box: fill-box; transform-origin: center;
  }
  .m360-bubbles .cb-heart { opacity: 0; transform: scale(0.3); fill: var(--cb-a-dots); }
  .m360-bubbles .show-heart .cb-heart { opacity: 1; transform: scale(1); }
  .m360-bubbles .show-heart .cb-dots-a { opacity: 0; transform: scale(0.6); }

  /* 5. Floating accents and the self-drawing wave */
  .m360-bubbles .cb-float { transform-box: fill-box; animation: cb-drift 7s ease-in-out infinite; }
  .m360-bubbles .cb-f2 { animation-duration: 9s; animation-delay: -2s; }
  .m360-bubbles .cb-f3 { animation-duration: 5s; animation-delay: -1s; }
  @keyframes cb-drift { 50% { transform: translate(4px, -10px); } }
  .m360-bubbles .cb-wave {
    stroke-dasharray: 190; stroke-dashoffset: 190;
    animation: cb-draw 1.4s ease-out 1.3s forwards, cb-sway 4s ease-in-out 2.7s infinite;
  }
  @keyframes cb-draw { to { stroke-dashoffset: 0; } }
  @keyframes cb-sway { 50% { transform: translateX(8px); } }

  @media (prefers-reduced-motion: reduce) {
    .m360-bubbles *, .m360-bubbles *::before { animation: none !important; transition: none !important; }
    .m360-bubbles .cb-wave { stroke-dashoffset: 0; }
  }
